ContextMenu problem in MDI forms

  • Thread starter Thread starter pei_world
  • Start date Start date
P

pei_world

I have a contextMenu in MDIparent form, but why it also show up in my
MDIchild form as well.
how to get rid of it?
 
pei_world,

Are you saying that when you right-click on the child form, you get the
parent form's context menu? Can you show a sample of code that does this?
 
yes, I have two form in parent and child containing relation


Nicholas Paldino said:
pei_world,

Are you saying that when you right-click on the child form, you get the
parent form's context menu? Can you show a sample of code that does this?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

pei_world said:
I have a contextMenu in MDIparent form, but why it also show up in my
MDIchild form as well.
how to get rid of it?
 
pei_world,

Can you post the code that does this?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

pei_world said:
yes, I have two form in parent and child containing relation


message news:#[email protected]...
pei_world,

Are you saying that when you right-click on the child form, you get the
parent form's context menu? Can you show a sample of code that does this?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

pei_world said:
I have a contextMenu in MDIparent form, but why it also show up in my
MDIchild form as well.
how to get rid of it?
 
I have following code to show a child window
//===============================================
private void btnData_Click(object sender, System.EventArgs e)
{
//click to new a Database window
ServiceServer.Database formDatabase = new Database(this);
formDatabase.Show();
}


in child window
I have
//===============================================
public Database(ServiceServer.serviceServer parent)
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

this.MdiParent = parent;
}
 
Back
Top