Hi Cj,
In VS.NET 2003, the part of 'Windows Form Designer generated code' contains
a constructor and the InitializeComponent method, and these code is located
in the form.vb file.
In VS 2005, there're some differences. Firstly, the part of 'Window Form
Designer generated code' does not contain a constructor. Secondly, these
code are moved to a separate file -- form.designer.vb, in order to make the
code of the form look neat.
As Martin has suggested, we could add a constructor in the form.vb file by
ourselves.
Constructor is called before the Load event handler of the form. You could
put your initialization code either in the constructor or the Load event
handler of the form. It depends on what kind of the initialization code is.
If you'd like to create an object that has a precedence relation to other
objects in the form or do some crucial checking, I suggest that you place
the initialization code in the constructor. Otherwise, you could place the
code in the constructor or the Load event handler.
Hope this helps.
If you have anything unclear, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.