Give me back my dialogs!

320 votes
Date Updated: 
Author Name: 

Window box is a script (and tutorial) to show you how you can use Dotnet and Win32 methods to get back dialogs you have lost from using multiple monitors.

UPDATE 2.4.2

Fixed an issue with monitor data, it now centers correctly on all screens. Sorry for the delay in finding that one. 

Additional Info: 

Previous Updates :


UPDATE 2.4.2

Fixed issue with monitor data, now centers correctly on all screens. 


Fixed a bug that errors with the SME interface pre max 2011 


Update -V2.3


Oh Alright, I added Slate Material Editor Support. It's a bit sketchy, it doesnt seem possible to return a Window handle for SME so you have to set it via the MXS interface. The resize is not currently working with the Datagrid, but the Reset to [0,0] works fine, which is probably what most people need. 

I have also fixed a bug - the Base64 function built the icons wrong, the close button should be on the far right. If you delete the icons from the Scripts/lonerobot/assets/icons folder then they will re-build correctly at runtime. 

Slate Material Editor reset added 

UPDATE - V2.2  

Just to note - getpoupdialogs() does not seem to return all of the floating dialogs present in a session of max. This is a change in behaviour from when I originally wrote the script (as the original screenshot will testify, yet since I upgraded to Win7 x64, the same command does not return these windows) You can get a better result in the script by changing the line -

DialogList = for i in (UIAccessor.GetPopupDialogs()) where not i == 0 collect i

to -

DialogList = for i in (windows.getChildrenHWND 0 parent:#max)

           where UIAccessor.IsWindow i[1] and (not i[5] == "AdApplicationButton") and (not i[5] == "") collect i[1]

This seems to give a better result on my Win7 x64 build. I didn't get this issue on vista 32bit so could be something to do with that. With this line it will now list the layer manager, material editor and render dialogs. It does return some toolbars which may or not be required, but better to be more complete than miss some. You can change the original script or download the updated code (version 2.2)

As you can see from the new screenshot, it's not missed any this time, well maybe the Slate Material Editor, but who uses that eh? :-) 


 The script has now been updated to remove the dependencies on the ribbon control icons. These have now been integrated into a Base64 encoded string, and builds them automatically when the script is first run. This should remove any icon errors you are seeing (in Max 2012 for example) Window box is a script (and tutorial) to show you how you can use Dotnet and Win32 methods to get back dialogs you have lost from using multiple monitors.



Version Requirement: 
Max 2010/2011/2012
lonerobot-windowbox2.2.mcr18.03 KB
lonerobot-windowbox2.3.mcr20.84 KB
lonerobot-windowbox2.4.mcr20.93 KB
lonerobot-windowbox2.4_1.mcr21.18 KB
lonerobot-windowbox2.4_2.mcr21.6 KB


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
W DIGITAL's picture

great script! but please tell

great script!
but please tell me or help me,
how i can i bring back my render progress dialogue
i installed a different max theme, and now its gone!
not nice

please help

LoneRobot's picture

Hi Martin, You are welcome,

Hi Martin,

You are welcome, i'm glad you find it useful.

Re script update - That's awesome - I am currently updating my script to incorporate your suggestions.

There is a dotnet class to get monitor information, so I can now add functionality to arrange the highlighted dialog on the second monitor (which generally how i work)
I thought ( a bit like windows 7) you could keep the dialog width but maximise along the height so you get the largest possible dialog - for things like the material editor and listener i think this would work nicely.

this is the working struct to handle the monitor data -

Struct MonitorInfoStruct

on create do
MonitorOps = (dotnetclass "System.Windows.Forms.Screen")

Count = MonitorOps.AllScreens.count
SecondMonitorPresent = if Count > 1 then true else false
Primary = MonitorOps.primaryscreen

if MonitorOps.AllScreens[1].Primary then
PrimaryWorkingArea= MonitorOps.primaryscreen.WorkingArea
PrimaryBounds= MonitorOps.primaryscreen.bounds

If SecondMonitorPresent then
Secondary = MonitorOps.AllScreens[2]
SecondaryWorkingArea= MonitorOps.AllScreens[2].WorkingArea
SecondaryBounds= MonitorOps.AllScreens[2].bounds


MonitorInfo = MonitorInfoStruct ()

if MonitorInfo.SecondMonitorPresent then

MarTroYx's picture

this is some updated one I'm

this is some updated one I'm using, I the mean time , I've done one where checking the checkbox hided the windows so I can see what below , let say a movie but seam visible property is not guaranty to be true right away so I just removed this functionality ...cheer :-)


AttachmentSize 6.81 KB
MarTroYx's picture

Hi Pete, yes I think you can

Hi Pete,

yes I think you can set style to maximized if I remember well, that would a be nice feature indeed !
another thing you might add but I let you see if it worth it , I done this in little one I posted when I double click listener it clearlistener or when I doubleclick render windows it render ... thing like that :-)

I also wanted to take this opportunity to thank you for your great base64 image utility, I really like it and I also have a feature request for this one ... if you ever plan an update please let me know :-)

Best regard,

LoneRobot's picture

Hi Track! thanks for you

Hi Track! thanks for you comment.

Martin - that is great, another couple of useful API methods. I was thinking that it would be good to have a kind of 'compact' mode where you could toggle the window states like in your script - you could dock it and then just click when you want the window to be focused/maximized. I also though i might add the max custom icons to each window type to show what it is when in compact mode.

I was wondering about methods to work out second monitor configurations/coordinates, it would be nice to click a window and have it hide all the other floating windows, and maximise the current selection on the second monitor.

Kstudio's picture
MarTroYx's picture

Hi Pete, Today I played a bit

Hi Pete,

Today I played a bit to get the thing I was talking working as I really wanted it :-)... I wanted to add it to your, but since I'm not very proficient with vb( just can't get it with the dim thing:-) I just made one from scratch just to illustrate the kind of feature I wanted ... I think it would be cool with a nice interface like your


AttachmentSize 5.28 KB
peaceman's picture

great tool! i wish i'd be

great tool! i wish i'd be running on max9 64...

LoneRobot's picture

Hi Martin, thanks for your

Hi Martin,

thanks for your comments! That's a good idea - This started as a piece of research and kind of grew, so so i wasnt sure what sort of extra functionality i wanted. I'll look into your suggestions as it would be nice to not have to keep focusing and resizing the extra dialogs. Cheers, Pete

MarTroYx's picture

Nice tool Pete, maybe an

Nice tool Pete,
maybe an option to make them visible/unvisible and when you click on one, it hide all the other so I can put all dialog full size on my second screen , sort of dialog switcher :-)

anyway, thank for sharing,

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.