How would I be able to make a child form come to front on a button click?
GAME
-5
Junior Poster
Recommended Answers
Jump to PostHow would I be able to make a child form come to front on a button click?
Trick.
private void button1_Click(object sender, EventArgs e) { Form2 s = new Form2(); s.MdiParent = this; button1.SendToBack(); s.Show(); } private void Form1_Load(object sender, EventArgs e) { this.MdiChildActivate += new EventHandler(Form1_MdiChildActivate); …
Jump to PostPass "null" as an argument.
Edit Program.cs:
Application.Run([B]new Form1(null)[/B]);
And before assigning the "F" variable, check if its not a null:
if (F != null) form8 = F;
Thanks
All 6 Replies
kvprajapati
1,826
Posting Genius
Team Colleague
GAME
-5
Junior Poster
GAME
-5
Junior Poster
GAME
-5
Junior Poster
farooqaaa
48
Enthusiast
GAME
-5
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.