Place form in Viewport

Hello,

For a long time now i trying to find answer to a problem,

TASK : Place a Maxform (dotnet maxform) at the bottom of the active viewport.

PROBLEM : i am not finding a way to get and convert the X Y of viewport to the screen space.

Can anyone please help me out with this.

Here is a link to what i want to achieve

http://www.paulneale.com/tutorials/dotNet/form/index.htm#settingProperties

Comments

Comment viewing options

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

You should be able to work

You should be able to work out the rest, here is how to get the dimensions and position of the active viewport:

viewportScreenPos = mouse.screenpos - mouse.pos
viewportSize = getViewSize()
sdinesh86's picture

Thanks

Thanks Swordslayer for the replay

That helped me a lot, finally i can move on. :)

jos's picture

thanx

works perfect! Guess it's not possible to change the position of a rollout? (if the active viewport is changed)

barigazy's picture

It's possible why not. This

It's possible why not.
This topic is useful for all question related to current thread.

http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=fil...

bga

jos's picture

SetDialogPos!

omg I overlooked the SetDialogPos function. I need some sleep.. Works now for a simple max rollout. Trying to solve the dotnet one.
http://www.paulneale.com/tutorials/dotNet/form/index.htm#settingProperties
Can figure it out the achieve his transparent effect so that the controls are visible but the forms not.

barigazy's picture

use form.opacity

use form.opacity propertie.(range from 0 to 1)

bga

jos's picture

if I use the form.opacity = 0

if I use the form.opacity = 0 the complete form is gone inclusive the controls. But found he solution!

--dont use
form=dotNetObject "maxCustomControls.maxForm"
-- but use
form=dotNetObject "form"

with the maxform you'll get a standard gray backgroundcolor.
with this code you have have controls without form

form=dotNetObject "form"
--Set the background color
form.backColor=(dotNetClass "system.drawing.color").black
--Set the transparent color
form.TransparencyKey=(dotNetClass "system.drawing.color").black
form.Opacity=1

barigazy, thanx for the help!

barigazy's picture

Use float value for opacity

Use float value for opacity propertie 0.1, 0.2 etc.
I send you a mail.
What do you think about that look.

bga

jos's picture

omg! thats totaly creasy!

omg! thats totaly creasy! looking out for the release!

jos's picture

Anyone? I'd like to know the

Anyone? I'd like to know the answer too.

Comment viewing options

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