Solved

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

Posted on 2008-10-11
3
890 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 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now