WinForms - Maximized TabPage in a TabControl

Posted on 2007-08-09
Medium Priority
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
  • 3
LVL 12

Accepted Solution

RubenvdLinden earned 1000 total points
ID: 19661285
Please try this:

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

I hope this helps.

Author Comment

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

Expert Comment

ID: 19661323
Can you set the MaximizeBox and MinimizeBox to false in the designer and try again?

Assisted Solution

Bruce_1975 earned 1000 total points
ID: 19663614
   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

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

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview
Suggested Courses
Course of the Month17 days, 5 hours left to enroll

864 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