Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change cursor at runtime?

Status
Not open for further replies.

hinchdog

Programmer
Feb 14, 2001
380
US
hi everyone!

I'm using the API function..

Public Declare Function LoadCursorFromFile Lib "user32" _
Alias "LoadCursorFromFileA" _
(ByVal lpFileName As String) As Long

.. to change the cursor to a special animated hourglass while the program performs a lengthy function. it works great, however, when the user moves the cursor over a textbox or outside the form in which it is called (i used modal forms) the cursor changes back to the arrow.

does anyone know why it does this, and can you please give me a solution that will keep the cursor set to the animated cursor no matter where the user moves the cursor within the program until the function is complete? thanks in advance!

-hinchdog
 
Certainly...

You only set the cursor for the window you are on...

And why are you dragging API into this, you sadist!

Have a look at the MousePointer property of controls and forms...

mmilan
 
i'm using API because visual basic does not support animated cursor files (.ani)

does anyone know how to make LoadCursorFromFile function apply to the entire program, not just the MDI form from which it was called?

thx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top