Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Dotnet Flickers
  RSS 2.0 ATOM  

Dotnet Flickers
Rate this thread
 
42056
 
Permlink of this thread  
avatar
  • AndyOaks
  • Posted: 16 April 2010 03:11 AM
  • Location: Horsham
  • Total Posts: 51
  • Joined: 04 October 2006 11:01 AM

Hi,

How do you remove the flickering when modifying the dotnet control size within a dialog?
I’ve noticed some scripts have worked around the problem (the excellent HCG Asset Browser Pro has achieved a flicker-free scaleable UI).

I`ve added some code below to demonstrate the problem. Scale the floating dialog and observe the old 8bit-loading-style flicker. I`ve purposely coloured the background colour of the dialog black to emphasise the issue.

rollout Roll_DotNet "Dot Net - Flicker Example"
(
 DotNetControl DotNetTest 
"FlowLayoutPanel" width:500 height:500 pos:[0,0]
 
 on Roll_DotNet Resized Sze 
do 
 
(
 DotNetTest
.Width=Sze.
 DotNetTest
.Height=Sze.y
 )
)

CreateDialog Roll_DotNet width
:500 height:500 style:#(#style_titlebar, #style_border, #style_sysmenu, #style_resizing, #style_minimizebox) bgcolor:(color 0 0 0)

Thanks,
Andy



Max 9.0 through 2010, XP-Pro 64 SP2.
ATI Radeon HD 4800 series
Core 2 Quad Q9650 3.0GHz, 8Gb Ram, DX9.0c.

Replies: 0
avatar
  • thedour
  • Posted: 16 April 2010 10:53 AM

I’ve noticed the same thing.  Though I don’t know how to fix that problem, I have started using DotNet Forms instead of rollouts/dialogs. I have more control over my UI and get less weird bugs like that.

/*Attempt to close if dialog is already open*/
try
(
 dotNetDialog
.close()
)
catch()

/*This is used instead of Maxscript Dialog/Rollout*/
dotNetDialog dotNetObject "MaxCustomControls.MaxForm"
dotNetDialog.size dotNetObject "System.Drawing.Size" 500 500
dotNetDialog
.Text "Dot Net - NO Flicker Example"

/*Setup FlowLayout and set dockstyle to Fill:  no need to re-adjust size :)*/
dotNetUI dotNetObject "FlowLayoutPanel"
dockStyle dotNetClass "System.Windows.Forms.DockStyle"
dotNetUI.Dock dockStyle.Fill

/*Add Controls to Dialog*/
dotNetDialog.Controls.add dotNetUI

/*Show/Create Dialog*/
dotNetDialog.Show()

You have to do a bit more dotNet with this though so it may not suite your particular script.  Hope this helps!



thedour.net
Render 3D @ ScriptSpot.com

Replies: 0
avatar
  • AndyOaks
  • Posted: 18 April 2010 09:33 PM

Thanks for your help.
That is definitely an improvement over the standard Maxscript UI dialog.

andy



Max 9.0 through 2010, XP-Pro 64 SP2.
ATI Radeon HD 4800 series
Core 2 Quad Q9650 3.0GHz, 8Gb Ram, DX9.0c.

Replies: 0