[size=2][color=#0000ff]Private[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub[/color][/size][size=2] Button1_Click([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] sender [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.Object, [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] e [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.EventArgs) [/size][size=2][color=#0000ff]Handles[/color][/size][size=2] Button1.Click
[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] f2 [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]New[/color][/size][size=2] Form2
f2.ShowDialog([/size][size=2][color=#0000ff]Me[/color][/size][size=2]) [/size][size=2][color=#008000]' Show Form2
[/color][/size][size=2][/size][size=2][color=#0000ff]Me[/color][/size][size=2].txtForm1.Text = f2.UserName [color=green]'note that userName is property that we created within form2[/color]
[/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub
[/color][/size]