VBA Code: Detect Cursor State

Posted on 2009-05-21
Medium Priority
Last Modified: 2013-11-25
VBA: Detect Cursor Icon

I am trying to detect if the cursor is displaying busy/hourglass from VBA (6.5). The project automates Internet Explorer from Excel and sometimes the website will be busy, but Excel and Internet Explorer will not be. Does anyone know of an API to detect if the mouse is busy?

I keep trying: Declare Function GetCursor Lib "user32.dll" () As Long

It comes with 65541 no matter what cursor is displayed. Im running Vista, Office 07, & IE8&
Question by:SignatureFund
1 Comment

Accepted Solution

tony_angelopoulos earned 2000 total points
ID: 24643517

I think you are close, but you might end up having to look at the GetIconInfo function (from the page above) and if it's any of the possible icons that are busy (wheel, hourglass, etc) then you would know.  The link should start you down the right track.

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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 …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

597 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