• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

Disabling mouse?

I am trying to disable the mouse when a form is loading.  I need to prevent the mouse from being able to click.  Is this possible and I also need code.  Thanks
0
timpeters
Asked:
timpeters
1 Solution
 
MirkwoodCommented:
Try the following

Declare Function GetDesktopWindow Lib "user32" Alias "GetDesktopWindow" () As Long

Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal hwnd As Long, ByVal fEnable As Long) As Long

dim hwndDSK as long
hwndDSK = GetDesktopWindow
screen.mousepointer = vbHourglass
enablewindow hwndDSK, 0
load form1
enablewindow hwndDSK, 1
screen.mousepointer = vbDefault

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now