How can I make Windows 95 style buttons in Visual C#?
Asked Answered
F

1

8

I am writing a program and I am just curious of how to put buttons that look like in Windows 95:


(source: aos.co.za)

I am using Visual C# Express 2010 with Winforms.

Is this possible in the compiler/IDE I described above?

Floret answered 2/2, 2014 at 13:29 Comment(1)
Edit your Main() method, delete the call to Application.EnableVisualStyles()Batiste
C
10

Normally you should let the user make that choice. They have the ability to do so.

But, to answer the question, you need to disable the visual styles feature that was introduced in XP. Visual styles are enabled with a call to:

Application.EnableVisualStyles();

typically as the first act of your Main method. Remove that call, and your application will not be styled.

With styles:

enter image description here

Without styles:

enter image description here

Cosette answered 2/2, 2014 at 13:59 Comment(3)
What about the title bar?Floret
That's painted by the system. So I guess you'd need to switch to Windows Classic system wide.Cosette
@EdwardKarak Create your form without the caption and draw it yourself. Then you will be able to make it look anyway you want. I do not know how to do it in .NET, but pure Windows API, it is just to create window without WS_CAPTION style.Nanette

© 2022 - 2024 — McMap. All rights reserved.