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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbHourglass

Status
Not open for further replies.

oleidole85

Programmer
Apr 24, 2008
3
NO
I have an ocx that does some work that takes some seconds. I have put in the following statement in the beginning of that code:

MousePointer = vbHourglass

The hourglass does not appear as it is supposed to. If I put in a messagebox below the statement, then the hourglass is shown after the messagebox is closed. The ocx is shown in another programs container. Maybe there is some way to activate the hourglass , just like the messagebox activated it. I have tried SetFocus,SetActiveWindow with no luck.
 
Also... you may need a Doevents right after you set your mouse pointer and the start of your ocx function.
 
I have tried the following statements:
SetFocus
SetForegroundWindow hwnd
SetActiveWindow hwnd
ShowWindow hwnd, 1
BringWindowToTop hwnd
MousePointer = vbHourglass
DoEvents

It still will mot show the hourglass.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top