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
Goran Bibic
458
2.9k
201.3k
Get value from another form in already opened form1
May 25 2018 4:18 AM
My code work...problem is ...
Form 1 button click open Form2 and find value, when return value open new form not existing? Some help
I think it is problem line 11..12...
//form1:
public
partial
class
Form1 : Form
{
Form2 f2;
public
Form1()
{
InitializeComponent();
}
private
void
button1_Click(object sender, EventArgs e)
{
if
(f2 == null)
f2 =
new
Form2();
f2.ValueFromForm1(textBox1.Text);
f2.Show();
}
}
//form2:
public
partial
class
Form2 : Form
{
public
Form2()
{
InitializeComponent();
}
public
void
ValueFromForm1(string value)
{
textBox1.Text = value;
}
}
Reply
Answers (
3
)
In Dev environment is working but in production is not work
Service Reference is using Arrays instead of List<Type>