Solved

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

Posted on 2008-10-11
3
894 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

737 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