By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,693 Members | 1,560 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,693 IT Pros & Developers. It's quick & easy.

Public Sub New() in Windows Form Designer generated code

P: n/a
Hi

I've realised that whenever I declare this sentence, "dim newform as new
mainform" in another form, the Public Sub New() in Windows Form Designer
generated code in mainform will automatically run.

May I know is there a way to prevent it running again. Thanks.

Regards
Melson
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Whats happening here is New is being run to construct that particular
instance of your form. You do not want to prevent this happening.


"Melson" <we****@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Hi

I've realised that whenever I declare this sentence, "dim newform as new
mainform" in another form, the Public Sub New() in Windows Form Designer
generated code in mainform will automatically run.

May I know is there a way to prevent it running again. Thanks.

Regards
Melson

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.