maxscript dotnet syntax question

maxscript dotnet syntax question

Anonymous
Not applicable
603 Views
4 Replies
Message 1 of 5

maxscript dotnet syntax question

Anonymous
Not applicable
If you define a winform in VS you can set the anchors of a control like the following:

your_control.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));

does anyone knows how to do the equivalent in maxscript "dotnet" syntax?

cheers,
0 Likes
604 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

DotNet.loadAssembly "Microsoft.VisualBasic.dll"
DotNet.loadAssembly "Microsoft.DirectX.DirectInput.dll"

SystemGuid = DotNetClass "Microsoft.DirectX.DirectInput.SystemGuid"
KeyboardDevice = DotNetObject "Microsoft.DirectX.DirectInput.Device" SystemGuid.Keyboard

CooperativeLevelFlags = DotNetClass "Microsoft.DirectX.DirectInput.CooperativeLevelFlags"

Operators = DotNetClass "Microsoft.VisualBasic.CompilerServices.Operators"

theCooperativeLevelFlags = Operators.OrObject CooperativeLevelFlags.Background CooperativeLevelFlags.NonExclusive


it is my some code
hope can help you
0 Likes
Message 3 of 5

Anonymous
Not applicable
Hey thanks,
That's exactly what I was looking for 🙂
0 Likes
Message 4 of 5

Anonymous
Not applicable
Your trick work and found the way trough Max api 🙂

dnAnchorStyles = dotnetclass "System.Windows.Forms.AnchorStyles"
dnProgressBar = dotNetObject "System.Windows.Forms.ProgressBar"
dnProgressBar.Anchor = dotNet.combineEnums dnAnchorStyles.Bottom dnAnchorStyles.Left dnAnchorStyles.Right
0 Likes
Message 5 of 5

Anonymous
Not applicable
dotNet.combineEnums
good !
🙂
0 Likes