theFrm = dotNetObject "MaxCustomControls.MaxForm"
theBox = dotNetObject "MaxCustomControls.MaxTextBox"
theBox.width = 290
theBox.height = 270
theBox.Multiline = true
theBox.Text = "Hey Jude, don't make it bad!\r\nTake a sad song and make it better..."
theBox.SelectionStart = 4
theBox.SelectionLength = 4
theFrm.controls.add theBox
theFrm.topmost = true
theFrm.text = "MaxTextBox"
thePtr = DotNetObject "System.IntPtr" (windows.getMAXHWND())
theHwnd = DotNetObject "MaxCustomControls.Win32HandleWrapper" thePtr
theFrm.Show(theHwnd)