Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 19th, 2003, 02:28 PM
Authorized User
 
Join Date: Oct 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Curiosity getting the best of me (Style Question)

I was recently changing a toy program to use a config file for it's database access information and removed the string assignments for my path from my new subroutine. The assignments were moved to the load routine so that the user could be queried about the setup and the program could choose the path and connection info from the config file. Thats not the question though. Sorry, just thought that some background would be helpful.

Anyway the question is what's the difference and the preferred usage of the new and form load routines?

I have always put my assignment statements into the new based on which new it is and have always launched login form, messages, info gatherers, etc from load? Any binding of data from DB's is also run in load.

I know there are different reasons and styles but just looking for some your thoughts.

Thanks,
Risu
 
Old January 7th, 2004, 02:41 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Well, the New() is the constructor for the form class. Load is when it actually loads. There will be a lot of things that aren't accessible yet from within New() because that's the first things that happens in that code. By the time you get to load, the form has been initialized, controls are in place, things like that.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView Style.! vinod ASP.NET 2.0 Professional 1 January 21st, 2008 06:05 AM
Style wiegel BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 February 27th, 2007 09:28 PM
Help with style Boomah XSLT 4 November 2nd, 2006 09:19 AM
hyperlinks style scrowler CSS Cascading Style Sheets 8 January 20th, 2005 09:13 AM
difference between style.visibility and style.disp Mimi Javascript How-To 6 September 17th, 2003 11:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.