Results 1 to 3 of 3

Thread: Screen "paint" after Restore

  1. #1

    Thread Starter
    New Member CASchryver's Avatar
    Join Date
    Jul 2009
    Location
    PA
    Posts
    9

    Question Screen "paint" after Restore

    Forgive the somewhat newbie question, but I can't find the answer so...

    I have a small application that has a LOT of labels on it (>100). When the program is running and is minimized and then restored, the screen seems to take a couple of seconds painting all of the fields. Is there a way to have it restore but be invisible and then just perform an action to make it visible? To make matters a little more complicated, I'm minimizing to the notification area. Could that have something to do with it?

    Much thanks for your supremely patient and informative responses.

  2. #2
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Screen "paint" after Restore

    That seems like an awful amount of labels. Are they all necessary? You can't combine any of them?

    You can set the DoubleBuffered property of the form to True and that should help a little.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  3. #3
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Screen "paint" after Restore

    I wonder how you fit that many controls on one form. One thing for sure is that it is a bad design if you needed those many controls in the first place.

    Anyways, have you tried calling Me.Refresh in any appropriate method to force the controls to paint immediately?
    vb.net Code:
    1. Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
    2.     Me.Refresh()
    3. End Sub
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

Tags for this Thread

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