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
cad sunny
NA
138
22.9k
mdi parent and child
Mar 18 2020 10:31 AM
i have 3 forms.
form1 is main form i.e parent form and ismdicontainer propery set to true in form1.
//here is form 1 button click for form 2 open
private
void
button1_Click(
object
sender, EventArgs e)
{
Form2 f2 =
new
Form2();
f2.ShowDialog();
}
now i want to form 2 button click then form2 close and form3 open a child in to form1 parent.
trying below code
// form2 button click for form3 open and form 2 close
private
void
button1_Click(
object
sender, EventArgs e)
{
//hide form2
this
.Hide();
//open form 3
Form3 f3 =
new
Form3();
f3.MdiParent = Form1.ActiveForm;
f3.Show();
//close form2
this
.Close();
}
form 2 closed but form3 not open as a child form3 to parent form1.
please share correct code.its helpful for me.iam new in this.just iam learning and try to make small application.
sorry for my bad launguage.
Reply
Answers (
7
)
After getting data through api, how to post in sql using c#
for loop in this program