1 Как сделать форму поверх всех окон?
2 Как перетаскивать форму по экрану не через полоску синюю?
'(код формы):
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hWnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call ReleaseCapture
Call SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End Sub
Private xx As Integer
Private yy As Integer
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then PopupMenu Menu
If Button = vbLeftButton Then
xx = X
yy = Y
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Form1.Left = Form1.Left - (xx - X)
Form1.Top = Form1.Top - (yy - Y)
End If
End Sub
Сейчас этот форум просматривают: AhrefsBot, Google-бот и гости: 51