I have a Tabbed MDI Container. When I maximize the tabs, I get the following menu. I don't want the user to have the ability to close the tabs. How do I disable this menu?
http://www.benefitsinacard.com/images/misc/sample_menu.jpg
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Brad ShannonPosted Mar 12, 2007, 7:46 AM
I have not tried that yet. I'm fairly new to C#. Would you be willing to share the code you used for your tabbed MDI Container?
Brad
Scott LyslePosted Mar 10, 2007, 10:59 PM
I would not think so, I built a demo project to look at the problem and I had a main MDI form with tabs and it did not present any problems. Did you try building a clean project to see if you could get some of other things to work (like the controlbox property?).
Brad ShannonPosted Mar 9, 2007, 8:30 AM
I tried the borderless form and it crashes the program. I'm wondering if all of this isn't working because of the tabs?
Scott LyslePosted Mar 8, 2007, 9:23 PM
Outside of using a borderless form (which surely won't show a control box) I believe there is a way in the API that you can block the display of the close X; I will look into that.
Brad ShannonPosted Mar 8, 2007, 7:14 AM
Ok that code disabled it, but it didn't go away. Yes, I want both forms maximized, but I don't want that control box there. Thanks for your help so far by the way...
Scott LyslePosted Mar 8, 2007, 4:44 AM
protected
override void WndProc(ref System.Windows.Forms.Message m){
if (m.Msg != 0x0010)
{
base.WndProc(ref m);
}
else
{
//do nothing
}
}
Scott LyslePosted Mar 8, 2007, 4:25 AM
Brad ShannonPosted Mar 6, 2007, 8:29 AM
Any other ideas?
Brad ShannonPosted Mar 5, 2007, 8:25 AM
Scott LyslePosted Mar 4, 2007, 6:53 AM