Mr.CommCicken
Pun Mastermind
LEVEL 1
300 XP
In this tutorial, I will teach you how to pass the data to another form in c#. This method has the ability to pass the value of the TextBox in Form1 to a TextBox in Form2. This method is so simple yet powerful. I hope this tutorial will help you solve your current problem in passing data to another form in c#. See the procedure below.
Creating Application
Step 1
Open Microsoft Visual Studio 2015 and create a new windows form application in c#. After that, do the Form just like this.
Step 2
Add another Form.
Step 3
Do the Form2 just like shown below.
Step 4
Double click the Form2 and do the following code for getting the data in the Form1.
Step 5
Go to the Form1 and double click the Button to fire the click even handler
of it. After that, do the following code in the method.
For more question about this article. You can contact me @
Email – [email protected]
Mobile No. – 09305235027 – TNT
FB Account – https://www.facebook.com/onnaj.soicalap
Or feel free to comment below
Creating Application
Step 1
Open Microsoft Visual Studio 2015 and create a new windows form application in c#. After that, do the Form just like this.

Step 2
Add another Form.

Step 3
Do the Form2 just like shown below.

Step 4
Double click the Form2 and do the following code for getting the data in the Form1.
- public
Form2(
string
title,string
by
)
- {
- InitializeComponent(
)
;
- textBox1.
Text
=
title +
" (:--------:) "
+
by
;
- }
Step 5
Go to the Form1 and double click the Button to fire the click even handler
of it. After that, do the following code in the method.
- string
titile =
textBox1.
Text
;
- string
by
=
textBox2.
Text
;
- Form2 frm =
new
Form2(
titile ,by
)
;
- frm.
Show
(
)
;
For more question about this article. You can contact me @
Email – [email protected]
Mobile No. – 09305235027 – TNT
FB Account – https://www.facebook.com/onnaj.soicalap
Or feel free to comment below