CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2001
    Posts
    16

    Label Caption disappears

    hi everybody,

    i am using a label in a vb form, whose caption is changed at runtime to show progress. But this caption disappears at few moments and a white patch appears on the form. The caption with new value reappears after a few seconds. What might be the problem and how to rectify this? Please Help

    Thanks in advance


  2. #2
    Join Date
    Aug 2001
    Location
    India
    Posts
    173

    Re: Label Caption disappears

    Give the sample code of it here.

    Regards,
    Shiv Kumar G.M.


  3. #3
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Label Caption disappears

    Your problem is one of the system refreshing its windows. When ProgramA has control of the system, no other program can refresh the screen until ProgramA relinquishes control. Hence the white box for a period of time.
    Try inserting a refresh immediately after updating the label like so:
    [vcode]
    Label1.Caption = "This is updated text"
    Label1.Refresh
    [/vbcode]

    John G

  4. #4
    Join Date
    Oct 2001
    Posts
    16

    Re: Label Caption disappears

    Thank you very much for your kind reply. I tried your suggestion and it is working perfectly.

    Once again thank you very much for your guidence.


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

Featured