Hi folks! I am trying to fix an issue regarding a mousepointer that gets stuck as an hourglass even after the task is performed, without getting back to its arrow form. It is a pretty strange issue that many at my company have tried to solve but without succeeding at it...
The code goes something like this...
----------------form-----------------------
Screen.MousePointer = vbHourglass
'do lots of stuff
Screen.MousePointer = vbArrow
Set Timer = New Xtimer
Timer.Interval = 10
Timer.Enabled = True
Me.Show vbModal
-------------------timer-------------------
Private Sub Timer_Tick()
timer.enabled = false
Screen.mousepointer = vbArrow
end sub
--------------------------------------------
I have done everything to this code to get the arrow instead of the hourglass when the form shows up... but nothing seems to work. I have even tried this:
' commented this... Screen.MousePointer = vbHourglass
'do lots of stuff
' commented this as well Set Timer = New Xtimer
' Timer.Interval = 10
' Timer.Enabled = True
Screen.MousePointer = vbArrow
Me.Show vbModal
There also are two weird things about it:
1) If you debug it step by step, then you get the vbArrow mouse pointer, as it should. But if you run it without a breakpoint, it get the hourglass mouspointer
2) When you run it without a breakpoint, sometimes it will work with the sticked hourglass pointer and sometimes with the arrow mousepointer. It switches between these two scenarios at a completely randomized way
I would appreciate any idea about it. Someone said that, taking into consideration the two weird thing that i listed above, it should be a timming problem, but i did not understand what he meant.
The code goes something like this...
----------------form-----------------------
Screen.MousePointer = vbHourglass
'do lots of stuff
Screen.MousePointer = vbArrow
Set Timer = New Xtimer
Timer.Interval = 10
Timer.Enabled = True
Me.Show vbModal
-------------------timer-------------------
Private Sub Timer_Tick()
timer.enabled = false
Screen.mousepointer = vbArrow
end sub
--------------------------------------------
I have done everything to this code to get the arrow instead of the hourglass when the form shows up... but nothing seems to work. I have even tried this:
' commented this... Screen.MousePointer = vbHourglass
'do lots of stuff
' commented this as well Set Timer = New Xtimer
' Timer.Interval = 10
' Timer.Enabled = True
Screen.MousePointer = vbArrow
Me.Show vbModal
There also are two weird things about it:
1) If you debug it step by step, then you get the vbArrow mouse pointer, as it should. But if you run it without a breakpoint, it get the hourglass mouspointer
2) When you run it without a breakpoint, sometimes it will work with the sticked hourglass pointer and sometimes with the arrow mousepointer. It switches between these two scenarios at a completely randomized way
I would appreciate any idea about it. Someone said that, taking into consideration the two weird thing that i listed above, it should be a timming problem, but i did not understand what he meant.