SendMessage Lib "User32" Alias "SendMessageA" in VB.net? [resolved]
This api call should move the form around. even if it is borderless (what mine is).. any suggestions on how to do this with the below code OR with other code?
I am wondering how i can use similar code or this code in vb.net
i doesnt seem to work at all.
VB Code:
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 Sub ReleaseCapture Lib "User32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lngReturnValue As Long
If Button = 1 Then
Call ReleaseCapture
lngReturnValue = SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
End Sub
this is the code i used in vb6.. but in lParam As Any gives : Any is not supported bug..