Solved

Disabling mouse?

Posted on 1998-11-16
1
136 Views
Last Modified: 2010-04-30
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
Comment
Question by:timpeters
1 Comment
 
LVL 13

Accepted Solution

by:
Mirkwood earned 100 total points
ID: 1445010
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now