How can you add the xp visual style to a vb.net application?
and how can you create an icon for it?
whatever icon i choose, it compliles it having the default "white box" icon, but when the app opens up the icon shows on the taskbar, but the actual exe has no icon.. how can i fix this?
Change the icon in project properties and the main form icon , then shut down your project , delete the exe file , run it again . It might help , although I changed the icon without any problems .
(vb.net 2003) yes if you open up the " Windows Form Designer generated code " region in your main form and add Application.EnableVisualStyles() directly after InitializeComponent() it does away with making the manifest file.
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
Application.EnableVisualStyles() 'ADD THIS LINE!!!
'Add any initialization after the InitializeComponent() call
End Sub
and set each control with a FlatStyle property to FlatStyle.System
the problem was I was get the following
-----------------------------------------------------------------------------
Error while trying to run project:Unable to start debugging
Unable to start program e:\vbdotnet\XPStyleExample.exe
The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.
------------------------------------------------------------------------------
So I did some searching and found this thread.
I found what session said and added this line.
Code:
Application.EnableVisualStyles() 'ADD THIS LINE!!!
Am I right in believing this line only works for VS.NET version 2003 and not the previous version?
Does anyone know why my program wouldn't work with the manifest file?
(A difficult question when you can't see my app infront of you).
If I use the single line of code method and run the app on a W2K machine will it run OK?