Help Needed: Timer and the hourglass cursor 
Author Message
 Help Needed: Timer and the hourglass cursor

I have a program that uses several Timer controls to create animation in
VB3 (change the image's .Left property to move it across the screen in
regular timed intervals). The problem is, when the program is waiting for
the Timer, it changes the cursor to an hourglass -- a less than desired
effect. What I'm looking for is a way to get rid of the hourglass.

I was able to use the Windows API routine ShowCursor to remove the cursor,
but that only does it for the arrow pointer, not the hourglass.

I've also tried reading the cursor position (via Windows API calls), moving
the cursor off the screen, then restoring the original cursor position.
That doesn't work because the API routine SetCursorPos ignores negative
X,Y screen coordinates.

If anyone has any ideas on how to get rid of that pesky hourglass, I'd
love to hear them.

Thanks, all!

---------------------------------------------------------------------------
Rob Thayer - TTI                     / About 2 years ago, my mother started

http://www.*-*-*.com/ ;  / where the hell she is now.
---------------------------------------------------------------------------
      Dynamite Site of the Nite:   http://www.*-*-*.com/
                      The Stick:   http://www.*-*-*.com/
---------------------------------------------------------------------------



Fri, 20 Mar 1998 03:00:00 GMT  
 Help Needed: Timer and the hourglass cursor

Quote:

>I have a program that uses several Timer controls to create animation in
>VB3 (change the image's .Left property to move it across the screen in
>regular timed intervals). The problem is, when the program is waiting for
>the Timer, it changes the cursor to an hourglass -- a less than desired
>effect. What I'm looking for is a way to get rid of the hourglass.
>I was able to use the Windows API routine ShowCursor to remove the cursor,
>but that only does it for the arrow pointer, not the hourglass.
>I've also tried reading the cursor position (via Windows API calls), moving
>the cursor off the screen, then restoring the original cursor position.
>That doesn't work because the API routine SetCursorPos ignores negative
>X,Y screen coordinates.
>If anyone has any ideas on how to get rid of that pesky hourglass, I'd
>love to hear them.

Another way.
Get rid of the timers.

'this function returns the ms since windows started
[Declarations]
Declare Function TimeGetTime lib "mmsystem" () as long

Then place the following code as the last code in the form load event

do
  Timex=TimeGetTime()
  ...do stuff based on time returned
  doevents
loop

Let me know how it works.

------------------------------------------------------------------------
Chuck Stuart - Mesquite TX USA  
VBTrace 2.00 is a runtime Procedure Trace, XRef,
Debug, Profiler and much more. Shareware $49.
http://www.apexsc.com/vb/ftp/coop/cstuart
ftp.apexsc.com/pub/cgvb/coop/cstuart
------------------------------------------------------------------------



Fri, 20 Mar 1998 03:00:00 GMT  
 Help Needed: Timer and the hourglass cursor
Where in your code are you changing the cursor to an hourglass.. It isn't done
by itself(at least in 3.0), if you have a sub that changes it and then doesn't
get finished before another sub is called the hourglass can go crazy)

But before and somewhere in the middle of the code of the timers..

Screen.MousePointer = 1

Michael Gernaey

================================
Creative Consultants
Custom Visual Basic, Visual (C)/C++, Delphi ,
programming...


Hey have fun that's what programming is for..
================================



Sun, 22 Mar 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Cursor doesn't change to Hourglass

2. Hourglass cursor in standard outlook folder view (inbox) ?

3. Hourglass cursor in standard folder view (Inbox) ?

4. Change the cursor icon to hourglass?

5. Hourglass cursor in standard folder view (inbox) ?

6. How to set Hourglass cursor?

7. Hourglass Cursor

8. Hourglass mouse cursor

9. How to force VB to make cursor=hourglass during startup

10. change cursor to hourglass?

11. Hourglass Cursor w/VB4

12. How to turn on hourglass cursor

 

 
Powered by phpBB® Forum Software