Results 1 to 5 of 5

Thread: Label text cant be changed fast!

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474

    Label text cant be changed fast!

    In the application I need to change the label text fast in a loop but it can't be done and it shows nothing till (kinda hangs) the end of the loop. I dont want to make delay in the loop to have this label shown, so how can i do that?

  2. #2
    Member
    Join Date
    Sep 2002
    Posts
    37
    In your loop try

    lbl.Text = sometext
    lbl.Refresh

    Hope that works

    Harold Hoffman

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Application.DoEvents will force it to show alos but it will slow down your loop a little bit too.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Thank you!
    That worked, but still if the form loses its focus then the label is not drawn, again till the end of the loop.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    The previous answer was for HAROLD HOFFMAN

    Application.DoEvents() did its best

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