GM писал(а):Лови WM_Move, и если me.left < 0 или me.top < 0me.left + me.width > screen.width или me.top + me.height > screen.height возращай false, или что-то в этом роде. Ты это имееш ввиду ?
Dim cx As Single, cy As Single, dx As Single, dy As Single
Dim bDrag As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
bDrag = True
dx = X: dy = Y: cx = Me.Left: cy = Me.Top
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If bDrag Then
cx = cx + X - dx: cy = cy + Y - dy
Me.Move cx, cy
End If
If Me.Left < 0 Then bDrag = False '''''''''''''''Чё то я не то сделал
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
bDrag = False
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 167