We help IT Professionals succeed at work.

stop form1 flashing into existence

TheMoog
TheMoog asked
on
Medium Priority
305 Views
Last Modified: 2013-12-14
Can anyone tell me how to make form 1 not visible before the form1 load event?  I have visible set to false in there but it flashes as visible for a brief second before it reaches that code snippet?  Thanks
Comment
Watch Question

If you don't want the form to show than don't show form1...

Application.Run(new Form1());

becomes

//Application.Run(new Form1());

If you have stuff that you do in the Form1 load event or constructor I suggest you move it.  Also keep in mind that the App.Run() "keeps the app alive" so to speak, so you'll have a pretty short program if you don't put some more code in your Main() function.

Regards,

~b

Author

Commented:
Im showing a wlcome screen before form i, theres a slight flicker before the welcome screen draws I trying to open form1 as non visible behind the welcome screen so they fade in, it looks great but the one niggle is a few mliseconds of flicker as form1 creates I thought there may be a place I could set form1 to not visible before the form1 load event
Ahhh, you're looking for a splash screen.  This tutorial is perfect for you...

http://www.codersource.net/csharp_splash_screen.aspx

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Thanks, Its opened up another thought process on how to do it cheers
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.