Open a New Window (child) from Menu

scopis

Newcomer
Joined
Mar 18, 2005
Messages
1
hi there,

im a C# newbie ... may i know how to open a new window (pop up) when i click the menu ? i write this and it works something .. but sometimes not :

using proC1.abc;
...
...
private void menuItem11_Click(object sender, System.EventArgs e)
{
MyWindowSample objdd = new MyWindowSample();
objdd.ShowDialog(this);
}


Note :
- 'MyWindowSample' is name of my Child window's Class
- 'proC1.abc' is name of my child window's namaspace

Pls assist .. is this correct ? Thks in advance...
 
It works sometimes? What happens when it "doesn't work".
What if you remove this from between the parentheses?
Is the code being called? Also, this won't work while the dialog form is displayed. :)
 
Back
Top