[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I Remove MDI title bar from the form when my child window is maximized?

Posted on 2008-10-11
3
Medium Priority
?
899 Views
Last Modified: 2011-10-19
Hi folks...
I've an application like notepad, and when I click in a new document link..
The form open an MDI child in forwindowstate = maximized
The MDI child open a new menu bar above my application menu.

i want to remove the MDI child menu bar.

This is my code

            mdiChild = new Form();
            mdiChild.Text = "Document" + count.ToString();

            mdiChild.MaximizeBox = false;
            mdiChild.MinimizeBox = false;
            mdiChild.StartPosition = FormStartPosition.CenterScreen;
            mdiChild.ControlBox = false;
            mdiChild.ShowIcon = false;    
            mdiChild.MdiParent = this;
            editTextBox = new TextBox();
            editTextBox.Multiline = true;
            editTextBox.Dock = DockStyle.Fill;
            mdiChild.Controls.Add(editTextBox);
            mdiChild.WindowState = FormWindowState.Maximized;
            mdiChild.FormBorderStyle = FormBorderStyle.None;            
            mdiChild.Show();

Please check the screenshot.
Thanks everybody for your help
0
Comment
Question by:nkoriginal
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 2000 total points
ID: 22696526
I have a VB.NET sample for the same issue
Please read comment No. ID:21283382 by author:VBRocks which tells how to solve the problem
http://www.experts-exchange.com/Programming/Languages/.NET/Q_23294648.html
0
 
LVL 5

Author Comment

by:nkoriginal
ID: 22699677
Thanks Ragi for your answer. but i tried the information in that link, and it doesn't work. also I checked that page before post my question here, but i dont know why it doesn't work.

Do you know another way??

thanks
0
 
LVL 5

Author Comment

by:nkoriginal
ID: 22704307
Ragi, I tried the information in that link, in different way and it worked!
Thanks

By the way, if somebody want the code in C# is:


        private void Form2_Resize(object sender, EventArgs e)
        {
 
            if (this.WindowState == FormWindowState.Maximized)
            {
                this.FormBorderStyle = FormBorderStyle.None;
            }
            else
            {
                this.FormBorderStyle = FormBorderStyle.Sizable;
            }
 
        }

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question