[Closed] DotNet form behide quad menus
So I have a dotnet form, it is being displayed using getMaxHWND then getting the max handle and using show and pass it the handle. This works great, code is below. The problem is that any time a quad menu opens it is behind the form. Any one know a solution to this?
form=dotNetObject "form"
sysPointer=dotNetObject "system.intPtr" (windows.getMaxHWND())
maxHandle=dotNetObject "maxCustomControls.win32HandleWrapper" sysPointer
form.show maxHandle
form = dotnetobject "MaxCustomControls.MaxForm"
form.ShowModeless()
tested in max 2010 x64 on WinXP x64
EDIT: the code you posted also works on my setup… what version of max / windows are you using?
Running your code, I’m showing the quad menus on top of the form. This is with Max 2011. And just out of curiosity, why not use the MaxForm as Gravey pointed out?
Oh, and thanks for pointing out the ‘windows.getMAXHWND()’ command, I didn’t know about that. It could come in handy in the future.
Also, after doing a search on that in the MaxScript help docs, I notice that there is a whole new chapter on the MaxCustomControl assembly that ships with Max. There’s a ton of useful stuff in there beyond MaxForm that I didn’t even know about. Thanks Bobo!
Well I will try the Maxform, had issues with it doing what I need some times. Maybe it is the GDI drawing that is causing the problem. I’m in 2011 with this tool.
I’ll poke some more with it and see what I can get to work but as it is now the quads are behind.