Importante: sendmessage
Publicado por BasicFun (6 intervenciones) el 09/05/2003 03:27:07
tengo el siguiente problema con la api sendmessage:
tengo hecho para que cuando uno mantenga sobre un control lo puedas mover, funciona en todos los controles, excepto en los frames, por favor si alguien sabe como solucionarlo ayudeme :)
este es el codigo (es cortito):
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Private Sub Frame1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call ReleaseCapture
Call SendMessage(Frame1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)
End Sub
tengo hecho para que cuando uno mantenga sobre un control lo puedas mover, funciona en todos los controles, excepto en los frames, por favor si alguien sabe como solucionarlo ayudeme :)
este es el codigo (es cortito):
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Private Sub Frame1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call ReleaseCapture
Call SendMessage(Frame1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)
End Sub
Valora esta pregunta


0