I have some user interface in VB 2005 that looks great in XP style but looks disgusting in classic style.
Any ideas on how to determine which mode the user is in and reformat the forms on the fly?
Post Reply Edit:
Thanks Daniel, it looks like this will work. I am using the first solution that you submitted using the GetCurrentThemeName () function.
I do the following:
Function declaration:
Private Declare Unicode Function GetCurrentThemeName Lib "uxtheme" (ByVal stringThemeName As System.Text.StringBuilder, ByVal lengthThemeName As Integer, ByVal stringColorName As System.Text.StringBuilder, ByVal lengthColorName As Integer, ByVal stringSizeName As System.Text.StringBuilder, ByVal lengthSizeName As Integer) As Int32
Code body:
Dim stringThemeName As New System.Text.StringBuilder(260)
Dim stringColorName As New System.Text.StringBuilder(260)
Dim stringSizeName As New System.Text.StringBuilder(260)
GetCurrentThemeName(stringThemeName, 260, stringColorName, 260, stringSizeName, 260)
MsgBox(stringThemeName.ToString)
MessageBox , Windows Classic Style/theme, "C:\WINDOWS\resources\Themes\luna\luna.msstyles", / Windows XP. , , , , .