Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
I have a project which is need to change default window minimize style & add new style. New style such as- Mac OS window minimize style.

Is it possible to add another minimize style in C#? If is it possible to change the minimize style, so please help me..

Thanks Code Project!! Thanks Everybody!!
Posted
Comments
Sergey Alexandrovich Kryukov 13-Dec-13 16:10pm    
Why?! Is it just to confuse the users? It's not "add style" — what would it supposed to mean? — by of course you can always mimic style. What's the problem?
—SA

Searched Google & CP?
Mac OS X Theme for Windows Forms[^]

Customize things based on your requirement.
 
Share this answer
 
Comments
BillWoodruff 15-Dec-13 4:48am    
Upvoted. fyi: the code example given in this article crashes repeatedly if compiled in VS 2013 against FrameWork 4. I am in the process of testing with earlier FrameWork versions, and will send some feedback to the author, but, the article is over three years old, and I don't expect (or feel like the the author should provide) support.
thatraja 16-Dec-13 8:06am    
I'm not a winform guy. And I think some authors enjoying good life so I think it's impossible to get support from them for their old goldy works.
I am not sure exactly what you mean when you say a new "style:" but I can show you how to alter the behavior of a WinForm when the user clicks to minimize it:
// some arbitrary size and location parameters
private Size customMinSize = new Size(100,100);

private Point customMinLocation = new Point(100, Screen.PrimaryScreen.WorkingArea.Height - 100);
        
// the SizeChanged EventHandler for the Form
private void Form1_SizeChanged(object sender, EventArgs e)
{
    if (WindowState == FormWindowState.Minimized)
    {
        this.SuspendLayout();

            this.WindowState = FormWindowState.Normal;
            this.Size = customMinSize;
            this.Location = customMinLocation;

        this.ResumeLayout();
    }
}
I strongly suggest you consider that users are socialized to expect the Windows OS to behave in certain ways, consistently.

Any time you change a basic expected behavior, like what happens when a Window is minimized, you run the risk of confusing users.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900