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.
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
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
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.