Results 1 to 5 of 5

Thread: Something to look at

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    54

    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

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    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
    Chris

  3. #3
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    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:
    1. 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.

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    54

    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.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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
  •  



Click Here to Expand Forum to Full Width