TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Zeb Rehman
NA
69
54k
Passing value between form in windows form
Mar 12 2012 4:30 AM
Hi friends,
I want to send a link which is stored in a string variable to another form. please tell me how can i code it.
Reply
Answers (
2
)
0
Senthilkumar
0
10.8k
4m
Mar 12 2012 4:47 AM
Hi,
You can send the value as arqument.
Form2 frm2 =
new
Form2(
this
.textBox1InForm1.Text);
frm2.ShowDialog();
In the form2, you need to write the constructor.
public
Form2(
string
strParam)
{
InitializeComponent();
this
.textBox1_InForm2.Text=strParam;
}
Please refer these link.
http://www.c-sharpcorner.com/UploadFile/thiagu304/passdata05172006234318PM/passdata.aspx
http://www.c-sharpcorner.com/UploadFile/alindag/HowToPassValuesBetweenWindowsForms.htm02242006061520AM/HowToPassValuesBetweenWindowsForms.htm.aspx
I
f it is useful then mark it as Accept answer.
Accepted Answer
0
Zeb Rehman
0
69
54k
Mar 12 2012 5:56 AM
Thanks brother Kumar
Opening powerpoint file through c sharp coding
C# code to drop a table?