Hi. I have a problem that is making me crazy. I am trying to display a series of 3 Windows forms. I have a main form which displays a bitmap background and a menu. Once I select a particular menu item, I wish to display Form1. No problem so far.
I would like to hide Form1 temporarily and display a custom confirmation box that uses the main form as a background. The problem is that if any other application window is open like the debugger or explorer, the confirmation box is shown on that application rather than on my main form.
I have tried moving where I call Form1.Visible to show the form before I call the new one and .SendToBack, and .BringToFront to no avail. Does anyone know a that I can manipulate the z-order?
Thank you in advance!!!!!
Code example:
CBCMsgBox oCBCMsgBox = new CBCMsgBox("Confirmation","Are You Sure You Want To Continue?", "Yes",DialogResult.Yes, "No", DialogResult.No);
// this.Visible = false, tried here as well as this.Parent.Visible and .SendToBack and .BringToFront
DialogResult dr = oCBCMsgBox.ShowDialog();
//this.Visible = false; // tried here as well
if (DialogResult.Yes == dr)
{
// Show Form2
}