troubleshooting Question

VB.NET best practice for where to set initial values on a form

Avatar of baffledbill
baffledbillFlag for Canada asked on
Visual Basic.NET.NET Programming
8 Comments1 Solution98 ViewsLast Modified:
When coding initializations in a Windows form, does it matter whether it's done in the New sub or in the Load event?

For example, when initializing a form I might want to:
- set Me.Text to the application's name and version
- capture the user's name
- create collections of objects for use later in the code
- load settings from a file or database to load into combo boxes or other objects
etc etc

Is it better to do these sorts of things in New or in Load? Or are some things better done in one than the other?
ASKER CERTIFIED SOLUTION
Éric Moreau
Senior .Net Consultant
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros