Hi all...
i new to this language.
so i m sorry if my question is very basically.
I have two forms in my project.
in first form i have a button. i want when i click this button form2 can be opened.
Please help...

Thank you

Recommended Answers

All 8 Replies

On Button Click Event :
Dim a As New Form2
a.Show

Thanks manutd4life but i got an error when i tried your code.
Thank you so much Jx_man, it works great.

Hope you will help me next time :)

Any time

Hi all...
i new to this language.
so i m sorry if my question is very basically.
I have two forms in my project.
in first form i have a button. i want when i click this button form2 can be opened.
Please help...

Thank you

Use "click event"

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.show()
End Sub

Thanks manutd4life but i got an error when i tried your code.
Thank you so much Jx_man, it works great.

Hope you will help me next time :)

Double Click on Main Form Button that u want to open for another form. And write following codelines :
Me.Hide()
Dim fchild As New SignUpForm
fchild.Show()

Hi all...
i new to this language.
so i m sorry if my question is very basically.
I have two forms in my project.
in first form i have a button. i want when i click this button form2 can be opened.
Please help...

Thank you

If ur using vb.net 2003 you can create object of the form two
consider the name of second form is form2
private sub button1_click
dim f as new form2
f.show()
end sub

If ur using vb.net 2005 you can
write the following code
private sub button1_click
form2.show

end sub

Hi all...
i new to this language.
so i m sorry if my question is very basically.
I have two forms in my project.
in first form i have a button. i want when i click this button form2 can be opened.
Please help...

Thank you

form2.open

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.