Hello
Could you please help how to make Navgationform moveable
I Try below VBA :
is not working
Thank
you
Could you please help how to make Navgationform moveable
I Try below VBA :
is not working
Thank
Code:
Option Compare Database
Option Explicit
#If Win64 Then
Private Declare PtrSafe Function ReleaseCapture Lib "user32" () As Long
#Else
Private Declare Function ReleaseCapture Lib "user32" () As Long
#End If
#If Win64 Then
Private Declare PtrSafe Function SendMessage Lib "user32" Alias "SendMessageA" ( _
ByVal hwnd As LongPtr, _
ByVal wMsg As Long, _
ByVal wParam As LongPtr, _
lParam As Any) As LongPtr
#Else
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
#End If
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Public Function fDragWindow(frm As Access.Form)
With frm
ReleaseCapture
SendMessage .hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0
End With
End Function
'on navigation form
Private Sub Detail_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
fDragWindow Me
End Sub
Attachments
Last edited: