Hi,
I have an application that I have been developing over several months. The problem I have is that it is a very long program and it is now tiring having to scroll through the code or use search to find things.
What I need to know is how to simply have "Include" files that form part of the main program.
I am not sure if I must create a new Module or Class within my project to do this?
I would want to have button events for my main form or "Form1" located in these seperate files.
For example, I would want to place the code below into a separte file which is compiled with my main code(form1)
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Textbox1.Text = "HELLO"
EndSub
Textbox1 is located on form 1.
I would also want global variables to be shared between the main form and the seperate include file.
I tried creating a new class called Class1.vb and used "inherits form1" within it. It compiles OK but the above example does not work.
Any help would be appreciated.
I have an application that I have been developing over several months. The problem I have is that it is a very long program and it is now tiring having to scroll through the code or use search to find things.
What I need to know is how to simply have "Include" files that form part of the main program.
I am not sure if I must create a new Module or Class within my project to do this?
I would want to have button events for my main form or "Form1" located in these seperate files.
For example, I would want to place the code below into a separte file which is compiled with my main code(form1)
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Textbox1.Text = "HELLO"
EndSub
Textbox1 is located on form 1.
I would also want global variables to be shared between the main form and the seperate include file.
I tried creating a new class called Class1.vb and used "inherits form1" within it. It compiles OK but the above example does not work.
Any help would be appreciated.