Move Borderless form in access 97

dt01pqt

Certified
Local time
Today, 01:08
Joined
Mar 22, 2004
Messages
271
I have managed to write code that crudely moves a borderless when mousemove and button is left using Docmd.MoveSize. The problem is this is very jumpy, blinky and crude. This is why I want to use API.

I have the following code that is not working. Why?

Code:
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 = &H2

SNIP

Private Sub mover_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = acLeftButton Then
ReleaseCapture
    SendMessage hwnd, WM_NCLBUTTONDOWN, _
        HTCAPTION, 0&
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom