Results 1 to 4 of 4

Thread: [02/03] Flashing label/Mouse pointer?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2004
    Location
    U.K
    Posts
    752

    [02/03] Flashing label/Mouse pointer?

    Hi people,

    I was hoping someone could help me out please.

    When my vb application tried to load data from the database it can take a few second depending on the amount of users using it at the same time, I was hoping someone could help me out please. When the data is being loaded I want some sort of flashing label to say 'Data loading.... Please wait' and the timer to replace the mouse pointer. Is this possible? If the label is a bad idea could you suggest what else I could try?

    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] Flashing label/Mouse pointer?

    You should set the Cursor property of your form and controls to WaitCursor while the data is loading and then back to Default when it's done. That's the Windows standard for user feedback to indicate they should wait while an operation completes. You may have to call Refresh on your form to ensure that the new mouse pointer gets displayed before the UI thread is too busy performing the task to change it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Addicted Member
    Join Date
    Sep 2008
    Location
    Jacksonville, Florida
    Posts
    147

    Re: [02/03] Flashing label/Mouse pointer?

    Quote Originally Posted by jmcilhinney
    You should set the Cursor property of your form and controls to WaitCursor while the data is loading and then back to Default when it's done. That's the Windows standard for user feedback to indicate they should wait while an operation completes. You may have to call Refresh on your form to ensure that the new mouse pointer gets displayed before the UI thread is too busy performing the task to change it.
    How about
    Code:
    windows.Forms.Application.DoEvents()
    Would that work as well as refresh?

    /Vb.net2005 is what I'm usin.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] Flashing label/Mouse pointer?

    Quote Originally Posted by MaslowB
    How about
    Code:
    windows.Forms.Application.DoEvents()
    Would that work as well as refresh?

    /Vb.net2005 is what I'm usin.
    Quite probably.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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