Results 1 to 2 of 2

Thread: How to know when window has completely painted?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091

    How to know when window has completely painted?

    I have a window that needs to run a length process. The process is threaded so it doesn't lock up the screen. However, I need this to run when the window is first loaded, not based on a button click or anything. The problem it creates is that it causes the window to stall a bit when initially painting itself. I even tried to put the call to the method in the Shown event, although it helps, it's still not perfect.

    Isn't there a way to absolutely wait until the window has completely painted itself? I think it would make for a much more polished look. Any help on this would be appreciated.

    Visual Studio 2010

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

    Re: How to know when window has completely painted?

    Try calling the form's Refresh method in the Shown event handler, then start your other thread.
    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