Can I disable Windows Theme in my form?

machinogodzilla

Active member
Joined
Mar 3, 2007
Messages
25
Programming Experience
Beginner
Hi!


I'd like my form to have an ordinary "classic" windows 95 look :) regardless
of a theme set by an user in xp or for the even worse case when the user
didn't set anything leaving those horrible thick blue borders.

How can I do it, if so?


Regards,
machinogodzilla
 
I think you mean to disable XP Visual Styles, it's a checkbox in Project Properties the Application tab.
 
It's a screen mode of the WinXP OS, by default it is XP Blue, the one you want is called Windows Standard. You find this in Control Panel > Screen/Display > the Appearance tab, windows and buttons setting. (it's also described in that article you linked)
 
I should have made it more precise I think :)

It's all correct but not what I wanted to know.

Maybe an example will halp a bit.

Let's say an user has the XP Blue mode on in his Windows. Is there any way
that I can show my form using the standard mode regardless his Windows is
set to the Blue mode? So whatever mode is set in his Windows my form will
always be in the standard mode.
 
I don't think so, as said it is an operating system setting common for all windows.
 
Apply Windows Classic Look to Application

Hello

I'm using Visual Studio 2005 and VB.NET to develop a desktop
application.

I was wondering if it was possible to programatically apply
the windows classic theme to the entire application under Win XP,
so in essence the application retains the classic look and the OS
retains the Windows XP theme (except if it is set to classic obviously).
 
Try this, you can combine it with the tip of post 2:
VB.NET:
Declare Function DeactivateWindowTheme Lib "uxtheme.dll" Alias "SetWindowTheme" ( _
ByVal hWnd As Int32, _
 Optional ByRef pszSubAppName As String = " ", _
 Optional ByRef pszSubIdList As String = " ") As Int32

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    DeactivateWindowTheme(Me.Handle.ToInt32)
End Sub
 
Back
Top