MAXScript Tools and Interaction with 3ds Max > DotNet In MAXScript > The MaxCustomControls Assembly > UI Controls >

# MaxForm

This dotNetObject is implemented by the MaxCustomControls Assembly and provides a DotNet Form with the 3ds Max Look-And-Feel including the current color scheme, 3ds Max icon etc.

EXAMPLE
    theFrm = dotNetObject "MaxCustomControls.MaxForm"
    theFrm.width = 225
    theFrm.height = 145
    theFrm.text = "MaxForm"
    theBtn = dotNetObject "System.Windows.Forms.Button"
    theBtn.text = "Welcome to 3ds Max!"
    theBtn.width = 200
    theBtn.height = 100
    theBtn.location = dotNetObject "System.Drawing.Point" 10 10
    theFrm.controls.add theBtn
    thePtr = DotNetObject "System.IntPtr" (windows.getMAXHWND())
    theHwnd = DotNetObject "MaxCustomControls.Win32HandleWrapper" thePtr
    theFrm.Show(theHwnd)
    theFrm = dotNetObject "System.Windows.Forms.Form"
    theFrm.width = 225
    theFrm.height = 145
    theFrm.text = "DotNet Form"
    theBtn = dotNetObject "System.Windows.Forms.Button"
    theBtn.text = "Welcome to DotNet!"
    theBtn.width = 200
    theBtn.height = 100
    theBtn.location = dotNetObject "System.Drawing.Point" 10 10
    theFrm.controls.add theBtn
    thePtr = DotNetObject "System.IntPtr" (windows.getMAXHWND())
    theHwnd = DotNetObject "MaxCustomControls.Win32HandleWrapper" thePtr
    theFrm.Show(theHwnd)

dotNetObject "MaxCustomControls.MaxForm"

Constructors:

    MaxCustomControls.MaxForm()

Properties:

    .AcceptButton : <System.Windows.Forms.IButtonControl>
    .AccessibilityObject : <System.Windows.Forms.AccessibleObject>, read-only
    .AccessibleDefaultActionDescription : <System.String>
    .AccessibleDescription : <System.String>
    .AccessibleName : <System.String>
    .AccessibleRole : <System.Windows.Forms.AccessibleRole>
    .ActiveControl : <System.Windows.Forms.Control>
    .ActiveForm : <System.Windows.Forms.Form>, read-only, static
    .ActiveMdiChild : <System.Windows.Forms.Form>, read-only
    .AllowDrop : <System.Boolean>
    .AllowTransparency : <System.Boolean>
    .Anchor : <System.Windows.Forms.AnchorStyles>
    .AutoScale : <System.Boolean>
    .AutoScaleBaseSize : <System.Drawing.Size>
    .AutoScaleDimensions : <System.Drawing.SizeF>
    .AutoScaleMode : <System.Windows.Forms.AutoScaleMode>
    .AutoScroll : <System.Boolean>
    .AutoScrollMargin : <System.Drawing.Size>
    .AutoScrollMinSize : <System.Drawing.Size>
    .AutoScrollOffset : <System.Drawing.Point>
    .AutoScrollPosition : <System.Drawing.Point>
    .AutoSize : <System.Boolean>
    .AutoSizeMode : <System.Windows.Forms.AutoSizeMode>
    .AutoValidate : <System.Windows.Forms.AutoValidate>
    .BackColor : <System.Drawing.Color>
    .BackgroundImage : <System.Drawing.Image>
    .BackgroundImageLayout : <System.Windows.Forms.ImageLayout>
    .BindingContext : <System.Windows.Forms.BindingContext>
    .Bottom : <System.Int32>, read-only
    .Bounds : <System.Drawing.Rectangle>
    .CancelButton : <System.Windows.Forms.IButtonControl>
    .CanFocus : <System.Boolean>, read-only
    .CanSelect : <System.Boolean>, read-only
    .Capture : <System.Boolean>
    .CausesValidation : <System.Boolean>
    .CheckForIllegalCrossThreadCalls : <System.Boolean>, static
    .ClientRectangle : <System.Drawing.Rectangle>, read-only
    .ClientSize : <System.Drawing.Size>
    .CompanyName : <System.String>, read-only
    .Container : <System.ComponentModel.IContainer>, read-only
    .ContainsFocus : <System.Boolean>, read-only
    .ContextMenu : <System.Windows.Forms.ContextMenu>
    .ContextMenuStrip : <System.Windows.Forms.ContextMenuStrip>
    .ControlBox : <System.Boolean>
    .Controls : <System.Windows.Forms.Control+ControlCollection>, read-only
    .Created : <System.Boolean>, read-only
    .CurrentAutoScaleDimensions : <System.Drawing.SizeF>, read-only
    .Cursor : <System.Windows.Forms.Cursor>
    .DataBindings : <System.Windows.Forms.ControlBindingsCollection>, read-only
    .DefaultBackColor : <System.Drawing.Color>, read-only, static
    .DefaultFont : <System.Drawing.Font>, read-only, static
    .DefaultForeColor : <System.Drawing.Color>, read-only, static
    .DesktopBounds : <System.Drawing.Rectangle>
    .DesktopLocation : <System.Drawing.Point>
    .DialogResult : <System.Windows.Forms.DialogResult>
    .DisplayRectangle : <System.Drawing.Rectangle>, read-only
    .Disposing : <System.Boolean>, read-only
    .Dock : <System.Windows.Forms.DockStyle>
    .DockPadding : <System.Windows.Forms.ScrollableControl+DockPaddingEdges>, read-only
    .Enabled : <System.Boolean>
    .Focused : <System.Boolean>, read-only
    .Font : <System.Drawing.Font>
    .ForeColor : <System.Drawing.Color>
    .FormBorderStyle : <System.Windows.Forms.FormBorderStyle>
    .Handle : <System.IntPtr>, read-only
    .HasChildren : <System.Boolean>, read-only
    .Height : <System.Int32>
    .HelpButton : <System.Boolean>
    .HorizontalScroll : <System.Windows.Forms.HScrollProperties>, read-only
    .Icon : <System.Drawing.Icon>
    .ImeMode : <System.Windows.Forms.ImeMode>
    .InvokeRequired : <System.Boolean>, read-only
    .IsAccessible : <System.Boolean>
    .IsDisposed : <System.Boolean>, read-only
    .IsHandleCreated : <System.Boolean>, read-only
    .IsMdiChild : <System.Boolean>, read-only
    .IsMdiContainer : <System.Boolean>
    .IsMirrored : <System.Boolean>, read-only
    .IsRestrictedWindow : <System.Boolean>, read-only
    .KeyPreview : <System.Boolean>
    .LayoutEngine : <System.Windows.Forms.Layout.LayoutEngine>, read-only
    .Left : <System.Int32>
    .Location : <System.Drawing.Point>
    .MainMenuStrip : <System.Windows.Forms.MenuStrip>
    .Margin : <System.Windows.Forms.Padding>
    .MaximizeBox : <System.Boolean>
    .MaximumSize : <System.Drawing.Size>
    .MdiChildren : <System.Windows.Forms.Form[]>, read-only
    .MdiParent : <System.Windows.Forms.Form>
    .Menu : <System.Windows.Forms.MainMenu>
    .MergedMenu : <System.Windows.Forms.MainMenu>, read-only
    .MinimizeBox : <System.Boolean>
    .MinimumSize : <System.Drawing.Size>
    .Modal : <System.Boolean>, read-only
    .ModifierKeys : <System.Windows.Forms.Keys>, read-only, static
    .MouseButtons : <System.Windows.Forms.MouseButtons>, read-only, static
    .MousePosition : <System.Drawing.Point>, read-only, static
    .Name : <System.String>
    .Opacity : <System.Double>
    .OwnedForms : <System.Windows.Forms.Form[]>, read-only
    .Owner : <System.Windows.Forms.Form>
    .Padding : <System.Windows.Forms.Padding>
    .Parent : <System.Windows.Forms.Control>
    .ParentForm : <System.Windows.Forms.Form>, read-only
    .PreferredSize : <System.Drawing.Size>, read-only
    .ProductName : <System.String>, read-only
    .ProductVersion : <System.String>, read-only
    .RecreatingHandle : <System.Boolean>, read-only
    .Region : <System.Drawing.Region>
    .RestoreBounds : <System.Drawing.Rectangle>, read-only
    .Right : <System.Int32>, read-only
    .RightToLeft : <System.Windows.Forms.RightToLeft>
    .RightToLeftLayout : <System.Boolean>
    .ShowIcon : <System.Boolean>
    .ShowInTaskbar : <System.Boolean>
    .Site : <System.ComponentModel.ISite>
    .Size : <System.Drawing.Size>
    .SizeGripStyle : <System.Windows.Forms.SizeGripStyle>
    .StartPosition : <System.Windows.Forms.FormStartPosition>
    .TabIndex : <System.Int32>
    .TabStop : <System.Boolean>
    .Tag : <System.Object>
    .Text : <System.String>
    .Top : <System.Int32>
    .TopLevel : <System.Boolean>
    .TopLevelControl : <System.Windows.Forms.Control>, read-only
    .TopMost : <System.Boolean>
    .TransparencyKey : <System.Drawing.Color>
    .UseWaitCursor : <System.Boolean>
    .VerticalScroll : <System.Windows.Forms.VScrollProperties>, read-only
    .Visible : <System.Boolean>
    .Width : <System.Int32>
    .WindowState : <System.Windows.Forms.FormWindowState>
    .WindowTarget : <System.Windows.Forms.IWindowTarget>

Methods:

    .Activate()
    .AddOwnedForm <System.Windows.Forms.Form>ownedForm
    .<System.IAsyncResult>BeginInvoke <System.Delegate>method
    .<System.IAsyncResult>BeginInvoke <System.Delegate>method <System.Object[]>args
    .BringToFront()
    .Close()
    .<System.Boolean>Contains <System.Windows.Forms.Control>ctl
    .CreateControl()
     .<System.Drawing.Graphics>CreateGraphics()
    .<System.Runtime.Remoting.ObjRef>CreateObjRef <System.Type>requestedType
    .Dispose()
     .<System.Windows.Forms.DragDropEffects>DoDragDrop <System.Object>data <System.Windows.Forms.DragDropEffects>allowedEffects
    .DrawToBitmap <System.Drawing.Bitmap>bitmap <System.Drawing.Rectangle>targetBounds
    .<System.Object>EndInvoke <System.IAsyncResult>asyncResult
    .<System.Boolean>Equals <System.Object>obj
    .[static]<System.Boolean>Equals <System.Object>objA <System.Object>objB
    .<System.Windows.Forms.Form>FindForm()
    .<System.Boolean>Focus()
     .[static]<System.Windows.Forms.Control>FromChildHandle <System.IntPtr>handle
     .[static]<System.Windows.Forms.Control>FromHandle <System.IntPtr>handle
     .[static]<System.Drawing.SizeF>GetAutoScaleSize <System.Drawing.Font>font
     .<System.Windows.Forms.Control>GetChildAtPoint <System.Drawing.Point>pt
     .<System.Windows.Forms.Control>GetChildAtPoint <System.Drawing.Point>pt <System.Windows.Forms.GetChildAtPointSkip>skipValue
     .<System.Windows.Forms.IContainerControl>GetContainerControl()
    .<System.Int32>GetHashCode()
    .<System.Object>GetLifetimeService()
    .<System.Windows.Forms.Control>GetNextControl <System.Windows.Forms.Control>ctl <System.Boolean>forward
    .<System.Drawing.Size>GetPreferredSize <System.Drawing.Size>proposedSize
    .<System.Type>GetType()
    .Hide()
     .<System.Object>InitializeLifetimeService()
    .Invalidate()
    .Invalidate <System.Drawing.Region>region
    .Invalidate <System.Boolean>invalidateChildren
    .Invalidate <System.Drawing.Rectangle>rc
    .Invalidate <System.Drawing.Rectangle>rc <System.Boolean>invalidateChildren
    .Invalidate <System.Drawing.Region>region <System.Boolean>invalidateChildren
    .<System.Object>Invoke <System.Delegate>method
    .<System.Object>Invoke <System.Delegate>method <System.Object[]>args
    .[static]<System.Boolean>IsKeyLocked <System.Windows.Forms.Keys>keyVal
    .[static]<System.Boolean>IsMnemonic <System.Char>charCode <System.String>text
    .LayoutMdi <System.Windows.Forms.MdiLayout>value
    .<System.Boolean>LoadState <MaxCustomControls.ICustomizationState>stateToLoad
    .PerformAutoScale()
    .PerformLayout()
    .PerformLayout <System.Windows.Forms.Control>affectedControl <System.String>affectedProperty
    .<System.Drawing.Point>PointToClient <System.Drawing.Point>p
    .<System.Drawing.Point>PointToScreen <System.Drawing.Point>p
     .<System.Windows.Forms.PreProcessControlState>PreProcessControlMessage <System.Windows.Forms.Message&>msg
    .<System.Boolean>PreProcessMessage <System.Windows.Forms.Message&>msg
    .<System.Drawing.Rectangle>RectangleToClient <System.Drawing.Rectangle>r
    .<System.Drawing.Rectangle>RectangleToScreen <System.Drawing.Rectangle>r
    .[static]<System.Boolean>ReferenceEquals <System.Object>objA <System.Object>objB
    .Refresh()
    .RemoveOwnedForm <System.Windows.Forms.Form>ownedForm
    .ResetBackColor()
    .ResetBindings()
    .ResetCursor()
    .ResetFont()
    .ResetForeColor()
    .ResetImeMode()
    .ResetRightToLeft()
    .ResetText()
    .ResumeLayout()
    .ResumeLayout <System.Boolean>performLayout
     .<MaxCustomControls.ICustomizationState>SaveState()
    .Scale <System.Drawing.SizeF>factor
    .Scale <System.Single>ratio
    .Scale <System.Single>dx <System.Single>dy
    .ScrollControlIntoView <System.Windows.Forms.Control>activeControl
    .Select()
    .<System.Boolean>SelectNextControl <System.Windows.Forms.Control>ctl <System.Boolean>forward <System.Boolean>tabStopOnly <System.Boolean>nested <System.Boolean>wrap
    .SendToBack()
    .SetAutoScrollMargin <System.Int32>x <System.Int32>y
    .SetBounds <System.Int32>x <System.Int32>y <System.Int32>width <System.Int32>height
    .SetBounds <System.Int32>x <System.Int32>y <System.Int32>width <System.Int32>height <System.Windows.Forms.BoundsSpecified>specified
    .SetDesktopBounds <System.Int32>x <System.Int32>y <System.Int32>width <System.Int32>height
    .SetDesktopLocation <System.Int32>x <System.Int32>y
    .Show()
    .Show <System.Windows.Forms.IWin32Window>owner
     .<System.Windows.Forms.DialogResult>ShowDialog()
     .<System.Windows.Forms.DialogResult>ShowDialog <System.Windows.Forms.IWin32Window>owner
     .<System.Windows.Forms.DialogResult>ShowModal()
    .<System.Windows.Forms.DialogResult>ShowModal <System.Windows.Forms.Form>aForm
    .ShowModeless()
    .SuspendLayout()
    .<System.String>ToString()
    .Update()
    .UpdateColors()
    .<System.Boolean>Validate()
    .<System.Boolean>Validate <System.Boolean>checkAutoValidate
    .<System.Boolean>ValidateChildren()
    .<System.Boolean>ValidateChildren <System.Windows.Forms.ValidationConstraints>validationConstraints

Events:

    on <control_name> Activated <System.EventArgs>e do ( ... )
    on <control_name> AutoSizeChanged <System.EventArgs>e do ( ... )
    on <control_name> AutoValidateChanged <System.EventArgs>e do ( ... )
    on <control_name> BackColorChanged <System.EventArgs>e do ( ... )
    on <control_name> BackgroundImageChanged <System.EventArgs>e do ( ... )
    on <control_name> BackgroundImageLayoutChanged <System.EventArgs>e do ( ... )
    on <control_name> BindingContextChanged <System.EventArgs>e do ( ... )
    on <control_name> CausesValidationChanged <System.EventArgs>e do ( ... )
    on <control_name> ChangeUICues <System.Windows.Forms.UICuesEventArgs>e do ( ... )
    on <control_name> Click <System.EventArgs>e do ( ... )
    on <control_name> ClientSizeChanged <System.EventArgs>e do ( ... )
    on <control_name> Closed <System.EventArgs>e do ( ... )
    on <control_name> Closing <System.ComponentModel.CancelEventArgs>e do ( ... )
    on <control_name> ContextMenuChanged <System.EventArgs>e do ( ... )
    on <control_name> ContextMenuStripChanged <System.EventArgs>e do ( ... )
    on <control_name> ControlAdded <System.Windows.Forms.ControlEventArgs>e do ( ... )
    on <control_name> ControlRemoved <System.Windows.Forms.ControlEventArgs>e do ( ... )
    on <control_name> CursorChanged <System.EventArgs>e do ( ... )
    on <control_name> Deactivate <System.EventArgs>e do ( ... )
    on <control_name> Disposed <System.EventArgs>e do ( ... )
    on <control_name> DockChanged <System.EventArgs>e do ( ... )
    on <control_name> DoubleClick <System.EventArgs>e do ( ... )
    on <control_name> DragDrop <System.Windows.Forms.DragEventArgs>e do ( ... )
    on <control_name> DragEnter <System.Windows.Forms.DragEventArgs>e do ( ... )
    on <control_name> DragLeave <System.EventArgs>e do ( ... )
    on <control_name> DragOver <System.Windows.Forms.DragEventArgs>e do ( ... )
    on <control_name> EnabledChanged <System.EventArgs>e do ( ... )
    on <control_name> Enter <System.EventArgs>e do ( ... )
    on <control_name> FontChanged <System.EventArgs>e do ( ... )
    on <control_name> ForeColorChanged <System.EventArgs>e do ( ... )
    on <control_name> FormClosed <System.Windows.Forms.FormClosedEventArgs>e do ( ... )
    on <control_name> FormClosing <System.Windows.Forms.FormClosingEventArgs>e do ( ... )
    on <control_name> GiveFeedback <System.Windows.Forms.GiveFeedbackEventArgs>e do ( ... )
    on <control_name> GotFocus <System.EventArgs>e do ( ... )
    on <control_name> HandleCreated <System.EventArgs>e do ( ... )
    on <control_name> HandleDestroyed <System.EventArgs>e do ( ... )
    on <control_name> HelpButtonClicked <System.ComponentModel.CancelEventArgs>e do ( ... )
    on <control_name> HelpRequested <System.Windows.Forms.HelpEventArgs>hlpevent do ( ... )
    on <control_name> ImeModeChanged <System.EventArgs>e do ( ... )
    on <control_name> InputLanguageChanged <System.Windows.Forms.InputLanguageChangedEventArgs>e do ( ... )
    on <control_name> InputLanguageChanging <System.Windows.Forms.InputLanguageChangingEventArgs>e do ( ... )
    on <control_name> Invalidated <System.Windows.Forms.InvalidateEventArgs>e do ( ... )
    on <control_name> KeyDown <System.Windows.Forms.KeyEventArgs>e do ( ... )
    on <control_name> KeyPress <System.Windows.Forms.KeyPressEventArgs>e do ( ... )
    on <control_name> KeyUp <System.Windows.Forms.KeyEventArgs>e do ( ... )
    on <control_name> Layout <System.Windows.Forms.LayoutEventArgs>e do ( ... )
    on <control_name> Leave <System.EventArgs>e do ( ... )
    on <control_name> Load <System.EventArgs>e do ( ... )
    on <control_name> LocationChanged <System.EventArgs>e do ( ... )
    on <control_name> LostFocus <System.EventArgs>e do ( ... )
    on <control_name> MarginChanged <System.EventArgs>e do ( ... )
    on <control_name> MaximizedBoundsChanged <System.EventArgs>e do ( ... )
    on <control_name> MaximumSizeChanged <System.EventArgs>e do ( ... )
    on <control_name> MdiChildActivate <System.EventArgs>e do ( ... )
    on <control_name> MenuComplete <System.EventArgs>e do ( ... )
    on <control_name> MenuStart <System.EventArgs>e do ( ... )
    on <control_name> MinimumSizeChanged <System.EventArgs>e do ( ... )
    on <control_name> MouseCaptureChanged <System.EventArgs>e do ( ... )
    on <control_name> MouseClick <System.Windows.Forms.MouseEventArgs>e do ( ... )
    on <control_name> MouseDoubleClick <System.Windows.Forms.MouseEventArgs>e do ( ... )
    on <control_name> MouseDown <System.Windows.Forms.MouseEventArgs>e do ( ... )
    on <control_name> MouseEnter <System.EventArgs>e do ( ... )
    on <control_name> MouseHover <System.EventArgs>e do ( ... )
    on <control_name> MouseLeave <System.EventArgs>e do ( ... )
    on <control_name> MouseMove <System.Windows.Forms.MouseEventArgs>e do ( ... )
    on <control_name> MouseUp <System.Windows.Forms.MouseEventArgs>e do ( ... )
    on <control_name> MouseWheel <System.Windows.Forms.MouseEventArgs>e do ( ... )
    on <control_name> Move <System.EventArgs>e do ( ... )
    on <control_name> PaddingChanged <System.EventArgs>e do ( ... )
    on <control_name> Paint <System.Windows.Forms.PaintEventArgs>e do ( ... )
    on <control_name> ParentChanged <System.EventArgs>e do ( ... )
    on <control_name> PreviewKeyDown <System.Windows.Forms.PreviewKeyDownEventArgs>e do ( ... )
    on <control_name> QueryAccessibilityHelp <System.Windows.Forms.QueryAccessibilityHelpEventArgs>e do ( ... )
    on <control_name> QueryContinueDrag <System.Windows.Forms.QueryContinueDragEventArgs>e do ( ... )
    on <control_name> RegionChanged <System.EventArgs>e do ( ... )
    on <control_name> Resize <System.EventArgs>e do ( ... )
    on <control_name> ResizeBegin <System.EventArgs>e do ( ... )
    on <control_name> ResizeEnd <System.EventArgs>e do ( ... )
    on <control_name> RightToLeftChanged <System.EventArgs>e do ( ... )
    on <control_name> RightToLeftLayoutChanged <System.EventArgs>e do ( ... )
    on <control_name> Scroll <System.Windows.Forms.ScrollEventArgs>e do ( ... )
    on <control_name> Shown <System.EventArgs>e do ( ... )
    on <control_name> SizeChanged <System.EventArgs>e do ( ... )
    on <control_name> StyleChanged <System.EventArgs>e do ( ... )
    on <control_name> SystemColorsChanged <System.EventArgs>e do ( ... )
    on <control_name> TabIndexChanged <System.EventArgs>e do ( ... )
    on <control_name> TabStopChanged <System.EventArgs>e do ( ... )
    on <control_name> TextChanged <System.EventArgs>e do ( ... )
    on <control_name> Validated <System.EventArgs>e do ( ... )
    on <control_name> Validating <System.ComponentModel.CancelEventArgs>e do ( ... )
    on <control_name> VisibleChanged <System.EventArgs>e do ( ... )

dotNetObject "MaxCustomControls.FormCustomizationState"

Constructors:

    MaxCustomControls.FormCustomizationState()

Properties:

    .ChildrenCount : <System.Int32>, read-only
    .FormLocation : <System.Drawing.Point>
    .FormSize : <System.Drawing.Size>
    .FormWindowState : <System.Windows.Forms.FormWindowState>
    .ParentState : <MaxCustomControls.ICustomizationState>
    .StateName : <System.String>

Methods:

    .<System.Boolean>AddChild <MaxCustomControls.ICustomizationState>stateObject
    .<System.Boolean>Equals <System.Object>obj
    .[static]<System.Boolean>Equals <System.Object>objA <System.Object>objB
     .<MaxCustomControls.ICustomizationState>GetChildByIndex <System.Int32>index
     .<MaxCustomControls.ICustomizationState>GetChildByName <System.String>name
    .<System.Int32>GetHashCode()
    .<System.Type>GetType()
    .<System.Boolean>LoadProperties <System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>dictionary
    .[static]<System.Boolean>ReferenceEquals <System.Object>objA <System.Object>objB
    .<System.Boolean>RemoveChildByIndex <System.Int32>index
    .<System.Boolean>RemoveChildByName <System.String>name
     .<System.Collections.Generic.Dictionary`2[System.String,System.String]>SaveProperties()
    .<System.String>ToString()

#### See Also

- MaxCustomControls Assembly

- DotNet In MAXScript

- dotNet Struct Methods