XP Style components

levyuk

Well-known member
Joined
Jun 7, 2004
Messages
313
Location
Wales, UK
Programming Experience
3-5
The way I did it was to use a manifest file, this changes the style of components on your application to look correct on whichever operating system the application is running, so for XP your buttons will have the XP style. I can't remember how to do it now but if you go to google and type 'XP style buttons +vb.det' then you can choose one of the tutorials from there.

Hope that helps
 

Neal

Forum Admin
Staff member
Joined
Jun 2, 2004
Messages
123
Location
VA
Programming Experience
10+
Shoot, I misunderstood.

Yes, preferred approach is a .manifest file. If using VS.NET 2003, you can use Application.EnableVisualStyles() but it is a little buggy.
 

enrique_g_g

New member
Joined
Mar 8, 2005
Messages
2
Programming Experience
5-10
what happen if i developing my application in VB.NET 2003. is sufficient to use Application.EnableVisualStyles() ?

it works perfectly with a form but not when i start my application froma module, like this

Imports System
Imports System.Drawing
Imports System.Windows.Forms

Module modPrincipal
Public Sub main()
System.Windows.Forms.Application.EnableVisualStyles()
Dim ofrmPrincipal As New frmPrincipal
ofrmPrincipal.Show()
If FECHAACTUAL <> Now.Today Then
Dim ofrmParametros As New frmParametros
If ofrmParametros.ShowDialog() = DialogResult.Cancel Then
ofrmPrincipal.Close()
Else
Application.Run(ofrmPrincipal)
End If
Else
Application.Run(ofrmPrincipal) ' <-- my code crash here(1)
End If
End Sub
End Module
 

enrique_g_g

New member
Joined
Mar 8, 2005
Messages
2
Programming Experience
5-10
what happen if i developing my application in VB.NET 2003. is sufficient to use Application.EnableVisualStyles() ?

it works perfectly with a form but not when i start my application froma module, like this

Imports System
Imports System.Drawing
Imports System.Windows.Forms

Module modPrincipal
Public Sub main()
System.Windows.Forms.Application.EnableVisualStyles()
Dim ofrmPrincipal As New frmPrincipal
ofrmPrincipal.Show()
If FECHAACTUAL <> Now.Today Then
Dim ofrmParametros As New frmParametros
If ofrmParametros.ShowDialog() = DialogResult.Cancel Then
ofrmPrincipal.Close()
Else
Application.Run(ofrmPrincipal)
End If
Else
Application.Run(ofrmPrincipal) ' <-- my code crash here(1)
End If
End Sub
End Module

----
please help!!!!!
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,335
Location
Sydney, Australia
Programming Experience
10+
Anyone wanting to add visual styles to a .NET app should go to http://www.skybound.ca/developer/default.aspx and download their VisualStyles component. You add the component to a form and everything else is taken care of. Couldn't be easier.
 
Top Bottom