I'm looking to get a little creative with a new Access project I am working and have been researching the possibility of having a custom "UI" for the Access forms.
I'd like to hide the default form toolbar and replace it with a new one. With that said, I need to figure out how to have a form draggable when he MouseDown event is triggered on the form - Was hoping to find someone that has done something similar and how you went about doing it.
After further research I've found exactly what I was looking for:
Private Declare Function ReleaseCapture Lib "user32" () As Long
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 Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION As Long = 2
Sub FormDrag(TheForm As Form)
Call SendMessage(TheForm.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, ByVal 0&)