View Full Version : max2010 ... how to disable visualstyle ?

04-19-2009, 09:13 PM
Hi , just tried 2010 today and I was horrified to found that the visual theme are enabled by default ... I want a way to turn this off because it's very ugly ... see what I mean ...


04-19-2009, 10:35 PM
1. right-click the icon you use to start 3ds Max
2. choose Properties...
3. go to the Compatibility tab
4. Enable/check the "Disable visual themes" option
That should fix that up.

This is probably the wrong subforum to ask in, though.. can't disable it for the app with MaxScript itself.

Edit: styles -> themes

04-20-2009, 12:03 AM
Looks this this would have been the 'appropriate' thread:

But it got hijacked and pointed to this thread.. which is more about the graphite modeling tools ribbon than about the interface in general:

04-20-2009, 12:31 AM
Thank Richard,

this work by disabling it before you start max but I really want to disable it on the form itself! Guest I'll stick with 2009 until they fix this :sad:

best regard,

04-20-2009, 01:13 AM
well, you could do it on the fly:

(dotnetclass "Application").VisualStyleState = (dotnetclass "Application").VisualStyleState.NoneEnabled

But, again, that affects the entire application.

If you want it per-control, you'd have to dig deep into: - Rendering Controls with Visual Styles

04-20-2009, 02:33 AM
per control don't seam to work, it still render with round corner but maybe I'm not using it right ...

try (NewForm1.close()) catch ()
dotNet.loadAssembly (getdir #maxroot +"\\MaxCustomControls.dll")

Global NewForm1 = dotnetobject "maxcustomcontrols.maxform"
local NewForm1_BT_1 = dotnetobject ""

local RenderClass = dotnetclass "System.Windows.Forms.ButtonRenderer"
local PState = dotnetclass "System.Windows.Forms.VisualStyles.PushButtonState"

local Resizing = false

fn NewForm1_closed s e =
NewForm1 = undefined
(dotnetclass "system.gc").collect()

fn NewForm1_BT_1_Paint s e =
if s.MouseButtons==s.MouseButtons.Left and not Resizing then
RenderClass.DrawButton e.Graphics s.ClientRectangle s.text s.font false PState.Pressed
RenderClass.DrawButton e.Graphics s.ClientRectangle s.text s.font false PState.Normal

--//-- NewForm1_BT_1 --//-- (Designer look for this line, Please DO NOT REMOVE)
NewForm1_BT_1.Size = dotNetobject "System.Drawing.Size" 249 81
NewForm1_BT_1.BackColor = NewForm1_BT_1.BackColor.fromargb 255 255 255 255
NewForm1_BT_1.Text = "Disable Visual Theme"
NewForm1_BT_1.Dock = NewForm1_BT_1.Dock.Fill = "NewForm1_BT_1"
NewForm1_BT_1.UseVisualStyleBackColor = false
dotnet.addeventhandler NewForm1_BT_1 "Paint" NewForm1_BT_1_Paint
NewForm1_BT_1.tag=dotnetmxsvalue NewForm1_BT_1

--//-- NewForm1 --//-- (Designer look for this line, Please DO NOT REMOVE)
NewForm1.Padding = dotNetobject "System.Windows.Forms.Padding" 10 10 10 10 = "NewForm1"
NewForm1.startposition = NewForm1.startposition.centerscreen
NewForm1.formborderstyle = NewForm1.formborderstyle.sizable
NewForm1.backcolor = NewForm1.backcolor.fromargb 255 220 220 220
NewForm1.forecolor = NewForm1.forecolor.fromargb 255 0 0 0
NewForm1.size = dotnetobject "system.drawing.size" 200 100
NewForm1.text = "test"
NewForm1.ShowIcon = true
NewForm1.showintaskbar = false
dotnet.addeventhandler NewForm1 "closed" NewForm1_closed
dotnet.addeventhandler NewForm1 "ResizeBegin" (fn doit s e = Resizing = true)
dotnet.addeventhandler NewForm1 "ResizeEnd" (fn doit s e = Resizing = false)
NewForm1.controls.add NewForm1_BT_1


but at least we can disable it from maxscript witch is a suitable solution until we find something better :-)
Thank again you're really helpful:beer:

CGTalk Moderation
04-20-2009, 02:33 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.