I have a MDi Form and three other forms.
all three forms are accessing form MDi Form.
here is the MDi form:-
I do the function to send the control backward when a form being open.
here is the code to send them back:-
if (MdiChildren != null)
{
btnaddProduct.SendToBack();
btnpurchaseDetails.SendToBack();
btnRegister.SendToBack();
}
Like this I want to bring them toFront when I close the opened form.
here is the form look after I close a form:-
I want your help to bring those three buttons to Front .please send me code to function this.


Riyaz AkhtarRank #2,275 · 619 reputationPosted Jul 24, 2013, 12:47 AM EDT
Create MdiChildActivate event in ur mdi form and write below code to show ur buttons:
private void mdi_MdiChildActivate(object sender, EventArgs e)
{
Form f = this.ActiveMdiChild;
if (f==null)
{
button1.BringToFront();
button2.BringToFront();
button3.BringToFront();
}
}
VulpesRank #55 · 29.2K reputationPosted Jul 24, 2013, 12:45 AM EDT
Bineesh ViswanathRank #1,681 · 907 reputationPosted Jul 24, 2013, 6:30 AM EDT