This Visual Basic tutorial is all about Linking Forms.
How to link multiple Forms? Linking form to another is not a major technical problem for most programmers who have been working without default instances of non-form classes for so long. If you are used to building Windows applications using Visual basic, well it’s a big change. This change is that you need to have a reference to a particular instance of a form for you to be able to use it.
This is the example on how to link a Fom:
Open Visual basic 2008 and create a new Windows Form Application. After that, select a Button in the toolbox and drag it into the form. Change the text property of a Button into “Show Form2”.
Click the solution explorer and right click the Windows Application that you have created. Select “add” and choose “Windows Form” to add another form.
The dialog of Add New Item will then appear. Do the process just like the figure shown below.
Now, you already have two Forms in the windows application. Go back to the form1 and double click the button to fire the click event handler of it and do the following code.
This is how you link a form to another form.
The code in the view code will look like this.
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- End Sub
Readers might read also: