WinForms - Maximized TabPage in a TabControl

Posted on 2007-08-09
Last Modified: 2008-01-09

Always when I add a TabPage to my TabControl and display it, the window starts small and then maximized automatically and it looks like a flickering. Needless to say, this is very anoying for the eye to look at.

If I use the following, the window starts maximized (no flickering) but I get some minimize and maximize buttons that I don´t like to see.
frm.WindowState = FormWindowState.Maximized;

How can I let the TabPage form start maximized with out these minimize/maximize/icon buttons?

Please Help!
Question by:Endelm
    LVL 12

    Accepted Solution

    Please try this:

    frm.MaximizeBox = false;
    frm.MinimizeBox = false;

    I hope this helps.

    Author Comment

    That didn't seem to make any differences.
    LVL 12

    Expert Comment

    Can you set the MaximizeBox and MinimizeBox to false in the designer and try again?
    LVL 6

    Assisted Solution

       public partial class Form1 : Form
            public Form1()
                this.WindowState = FormWindowState.Maximized; // maximize form
                this.MaximizeBox = false; // hide maximize box
                this.MinimizeBox = false; // hide minimize box
                this.ShowIcon = false; // hide the icon
                this.ControlBox = false; // hides the whole control box (min, max and the X)
    LVL 12

    Expert Comment

    The suggested code samples are all correct.
    I suggest to split points.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    In my previous two articles we discussed Binary Serialization ( and XML Serialization ( In this article we will try to know more about SOAP (Simple Object Acces…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 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

    10 Experts available now in Live!

    Get 1:1 Help Now