I wrote the code below based on help from others and resources I found on the net. I don't understand why it works though. What does the number of twips per pixel have to do with which mouse button has been clicked? Anyone that can provide insight on this would be viewed as a savior. Thank You.



private Sub FORM_MouseMove(Button as Integer, Shift as Integer, X as Single, Y as Single)

static lngMsg as Long

lngMsg = X / Screen.TwipsPerPixelX
'MsgBox lngMsg, vbOKOnly, "OK"
Select Case lngMsg
Case WM_RBUTTONUP

Case WM_LBUTTONDOWN
'MsgBox lngMsg, vbOKOnly, "OK"
Debug.print lngMsg
frmMain.WindowState = Normal
frmMain.Show

Case WM_LBUTTONDBLCLK

Case else
End Select