Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey, all the programs that i create with visual studio.net have this old looking style at the buttons and groupboxes enc. Rectangle en no 3d effect on it(like in xp) also when i use them in xp, the buttons are the same.

 

Is their a setting in visual studio.net to get the xp style buttons in my forms?

Posted (edited)

Plenty of threads on this, plenty of answers from how to do it yourself, to telling .Net how to do it, to repainting buttons.

 

I think this one most pertains to what you need: http://www.xtremedotnettalk.com/showthread.php?t=70100&highlight=style+buttons

 

Heres the MSDN Link:

 

ms-help://MS.MSDNQTR.2003FEB.1033/dv_vstechart/html/vbtchUsingWindowsXPVisualStylesWithControlsOnWindowsForms.htm

 

Found it in the Controls category, under XP

Edited by Denaes
Posted (edited)

That is cool, But I have a question. I did the Application.enablevisualstyles and to get it to work you have to set Flatstyle.System

 

Ok when I do that I have an Image on it. Bascally a stop sign image instead of the text as stop. The image goes away when I set FlatStyle from Standard to System. Is there a way to keep the image on there?

Edited by techmanbd
Live as if you were to die tomorrow. Learn as if you were to live forever.
Gandhi
Posted
Ok maybe a stupid question' date=' how do i open that ms-help link?[/quote']

 

Copy it into your address window of your browser and hit enter.

 

It doesn't work as a hyperlink for some reason. Something else comes up. It might be a link directly to the MSDN installed on your computer.

 

If you don't have it installed on your computer (naughty you!) then you probobly have to go onto the MSDN on microsofts website and like I said, search for Controls, then the subheading XP.

Posted

What I'd like is to have XP style controls just as controls. Alternatives to normal controls. Doesn't matter what OS you're on, you can use them.

 

The forms on XP look stupid. the buttons and other controls look pretty cool.

Posted

I did the manifest thingy, now everything looks cool except de messagebox.show

 

That one still got the old look :s

 

Is their any way to change that one too?

Posted

My messagebox.show shows the XP way.

 

this is what I did

 

#Region " Windows Form Designer generated code "

Public Shared Sub main()

Application.EnableVisualStyles()

Application.Run(New frmController)

End Sub

 

Public Sub New()

MyBase.New()

 

'This call is required by the Windows Form Designer.

InitializeComponent()

 

'Add any initialization after the InitializeComponent() call

 

End Sub

Live as if you were to die tomorrow. Learn as if you were to live forever.
Gandhi
Posted

hmm, sorry it was the InputBox that still shows the old buttons enc.

 

 

and with your code i get this error:

'EnableVisualStyles' is not a member of 'System.Windows.Forms.Application'.

 

 

do i need to import something first to use it?

Posted

What version VB.NET do you have? I have 2003 that goes with framework 1.1.

 

and from what I read version below this doesn't have that capability

Live as if you were to die tomorrow. Learn as if you were to live forever.
Gandhi
Posted
All you have to do, is click on a button and in the properties menu go to flat style, and change it to system. It's kind of simple... Also some controls in vb.net do not support a xp style...
Posted

I think I have an easier solution to your piccies dissapearing

 

use this code before the application.run statement.

 

This is c# so you will have to find the vb equivalent.

 

Application.EnableVisualStyles();

Application.DoEvents();

 

 

PB

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...