473,394 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Public Sub New() in Windows Form Designer generated code

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
1 1474
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: DraguVaso | last post by:
Hi, I'm having some weird behaviour, and I can't find any solution to this. I made a UserControl (uclCommands) which contains a Toolbar (ToolBar1) with Modifiers = Public. I put this...
2
by: Ralph Wiggum | last post by:
I have created a control in C# and it works a treat, however, when I drop the control into a C# Windows Forms application, it does a very odd thing. It creates the control in design mode, but when...
2
by: MadMikey | last post by:
Can I change the order that controls are defined, or built, in the "Windows Form Designer generated code" section? I'm using VB.NET 2003. I have a custom control, that due to licensing...
4
by: gsilvey | last post by:
Is there a way to rebuild the code that is generated by the forms designer? It compiles, but it seems to have controls left in it that I previously removed using the designer. I'd like to just...
1
by: RSH | last post by:
Hi, I have a situation where I have a Windows Form and I have 2 classes defined in the code, the primary form and a class that I got from the internet. I have a label in the form that I would...
1
by: beniro | last post by:
Hello, all. I'm implementing LinkPoint API on my site, but I have an error coming up in their code, and I'm wondering if anyone could give me any guidance on this one. Here is the specific error:...
13
by: cj | last post by:
In a project done in 2003 about a year ago I was told to add the SocketWrench code below into the Windows Form Designer generated code area as shown below. #Region " Windows Form Designer...
13
by: active | last post by:
With VS2005 the windows form designer uses the files *.Designer.vb I hope no one at MS is reading this because I know it will upset them to know - I like the old way better! I've been looking...
8
by: TomC | last post by:
I want to bypass the Windows Form Designer in VS, to create a form programmatically. The elements of the form are to be arranged in a table, and I want the size of the table (and therefore the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.