Lemon Posted March 18, 2004 Posted March 18, 2004 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? Quote
Denaes Posted March 18, 2004 Posted March 18, 2004 (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 March 18, 2004 by Denaes Quote
techmanbd Posted March 18, 2004 Posted March 18, 2004 (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 March 18, 2004 by techmanbd Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
Lemon Posted March 18, 2004 Author Posted March 18, 2004 Ok maybe a stupid question, how do i open that ms-help link? Quote
Denaes Posted March 18, 2004 Posted March 18, 2004 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. Quote
Denaes Posted March 18, 2004 Posted March 18, 2004 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. Quote
Lemon Posted March 18, 2004 Author Posted March 18, 2004 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? Quote
techmanbd Posted March 18, 2004 Posted March 18, 2004 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 Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
Lemon Posted March 18, 2004 Author Posted March 18, 2004 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? Quote
techmanbd Posted March 18, 2004 Posted March 18, 2004 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 Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
decrypt Posted March 18, 2004 Posted March 18, 2004 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... Quote
PhilBayley Posted March 20, 2004 Posted March 20, 2004 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.