For the past few years I have been fascinated with programs like Window Blinds, and programs that have unique title bars. I would like to know how I may be able to use a combination of WinAPI and UxTheme API commands to make a custom theme for my application.
I have already looked at code for detecting if a Visual Style is being used on an application. The example of that is like the following:
<StructLayout(LayoutKind.Sequential)> _
Public Structure DLLVERSIONINFO
Public cbSize As Integer
Public dwMajorVersion As Integer
Public dwMinorVersion As Integer
Public dwBuildNumber As Integer
Public dwPlatformID As Integer
End Structure
Public Declare Function IsThemeActive Lib "uxtheme.dll" () As Boolean
Public Declare Function IsAppThemed Lib "uxtheme.dll" () As Boolean
Private Function IsVisualStylesEnabledRevisited() As Boolean
Dim os As OperatingSystem = System.Environment.OSVersion
If os.Platform = PlatformID.Win32NT AndAlso (((os.Version.Major = 5) And (os.Version.Minor >= 1)) Or (os.Version.Major > 5)) Then
Dim version As New DLLVERSIONINFO
version.cbSize = Len(version)
If DllGetVersion(version) = 0 Then
Return (version.dwMajorVersion > 5) AndAlso Win32API.IsThemeActive() AndAlso Win32API.IsAppThemed()
End If
End If
Return False
End Function
I have found many variations of this code. I also know that you can have your application have theme support by using the enablevisualstyls() command, which I have done successfylly.
At the moment I am using Visual Basic .NET 2003, but I have been able to translate code accurately from C#.NET. Any help would be much appreciative.
Regards,
1tg46

Click sig for DB Network X