Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Disabling mouse?

Posted on 1998-11-16
1
140 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 60
Macro which automatically send Excel spreadsheet to Outlook problem 2 76
Add and format columns in vb6 7 63
Excel Automation VBA 19 90
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

829 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