|
-
Mar 7th, 2006, 04:08 AM
#1
Thread Starter
Member
Something to look at
I have programme which performs calcs, re-dims huge arrays and draws the resulting graphs.
While it's doing this the computer just looks like it has crashed. To stop my users messing with the computer while it is doing it's job, I would like to give them a spinning mouse cursor or moving graphic so they know everything with the programme is OK, and the computer hasn't crashed.
Can anyone point me in the right direction? The graphic would have to be kept "on-top" as any message box I have shown in the past gets hidden behind whichever graph window is given focus while re-drawing.
Thanks
-
Mar 7th, 2006, 04:43 AM
#2
Re: Something to look at
I would just have a new form with the 'please wait' image on, and call the form up when you do the processing, you could find the 'always on top' API and use that to stop it falling behind anything, then just unload the form when the proecessing finishes
-
Mar 7th, 2006, 04:46 AM
#3
Frenzied Member
Re: Something to look at
part 1. keeping in top
there is an api call that u can use to keep the active form on top of all windows. do a search here in vbforums or in allapi.net
part 2. the spinning cursor
use this little code
VB Code:
me.mousepointer=vbhourglass
this wont give u the spinning cursor but a working hourglass cursor.
part 3. supplemental
use "doevents" functions inside loops to stop your program look like it has crashed.
-
Mar 9th, 2006, 07:47 AM
#4
Thread Starter
Member
Re: Something to look at
Both helpful tips, thanks guys.
I opted for the form method, incorporating a progress bar. When I show the form I can pass in a string for displaying which keeps the user informed of which operation is happening, "Initialising Arrays", "Importing Settings" etc.
Looks quite good, so thanks again.
-
Mar 9th, 2006, 07:50 AM
#5
Re: Something to look at
If this is resolved, please pull down the Thread Tools menu and click the Mark Thread Resolved button. That will let everyone know that you have your answer.
Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|