4
Contributors
3
Replies
6
Views
6 Years
Discussion Span
Last Post by mbrown686886
0

i don't really understand the question. can u give an example?

can anyone help me to figure out how to nest forms on visual basic??
example:
i would like to link form1 to form2?

0

Something like this?
Pre-requisites: 2 Forms, each containing a Label.

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Form2.Label1.Text = "text from Form1"
        Form2.Show()
    End Sub
End Class
Public Class Form2

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Form1.Label1.Text = Form1.Text
    End Sub
End Class
0

can anyone help me to figure out how to nest forms on visual basic??
example:
i would like to link form1 to form2?

You could use the inherits Method

Try this
Public Class Form2
Inherits Namespace1.Form1

Good Luck!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.