Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello..

i don't have a answer @ my first question jet but i have another one:

i wanna show the info by click on a button from a form into another form.

can someone explain it to me ho i can do that?

thanx
Posted

Here is the code for the first forms button click event:
VB
Private Sub button1_Click(sender As Object, e As EventArgs)
    Dim frm2_1 As New Form2("Hello")
    frm2_1.Show()
    Dim frm2_2 As New Form2("World")
    frm2_2.Show()
End Sub

and for the constructor of the second form you could use something like that:
VB
Namespace WindowsFormsApplication1
	Public Partial Class Form2
		Inherits Form
		Public Sub New(strContent As String)
			InitializeComponent()
			textBox1.Text = strContent
		End Sub
	End Class
End Namespace
 
Share this answer
 
Thanx for your help!
i Tried your code and it works fine to me, now i'm gonna try to get it into my own project.

thnx (Y)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900