clearListener () try( hForm.close() )catch() dotnet.loadAssembly "D:\\Desktop\\dll\\SunnyUI.Common.dll" dotnet.loadAssembly "D:\\Desktop\\dll\\SunnyUI.dll" fn whenButtonIsPressed = ( print "button01" ) fn whenNavIsPressed a b= ( print(classof b) ) uiNavbar1=dotNetObject "Sunny.UI.UINavbar" uiNavbar1.nodes.add("¿Ø¼þ") --Create a DotNet Button mButton = dotNetObject "Sunny.UI.UIbutton" mButton.text = "mButton" mButton.size = dotNetObject "System.Drawing.Size" 160 80 mButton.location = dotNetObject "System.Drawing.Point" 160 0 page1001Button = dotNetObject "Sunny.UI.UIbutton" page1001Button.text = "page1001 Button" page1001Button.size = dotNetObject "System.Drawing.Size" 160 80 page1001Button.location = dotNetObject "System.Drawing.Point" 0 0 page1002Button = dotNetObject "Sunny.UI.UIbutton" page1002Button.text = "page1002 Button" page1002Button.size = dotNetObject "System.Drawing.Size" 160 80 page1002Button.location = dotNetObject "System.Drawing.Point" 0 0 --Create a DotNet Form hForm = dotNetObject "Sunny.UI.UIform" --Create a DotNet page hpage1001 = dotNetObject "Sunny.UI.UIpage" hpage1001.AutoScaleMode=hpage1001.AutoScaleMode.none hpage1001.PageIndex=1001 UIlabel1001=dotNetObject "Sunny.UI.UIlabel" UIlabel1001.text="Page 1001" UIlabel1001.location = dotNetObject "System.Drawing.Point" 0 200 UIlabel1001.ForeColor=(dotnetclass "System.Drawing.Color").FromArgb 255 0 255 255 hpage1001.text="page 1" hpage1001.BackColor=(dotnetclass "System.Drawing.Color").FromArgb 255 0 0 0 hpage1002 = dotNetObject "Sunny.UI.UIpage" hpage1002.AutoScaleMode=hpage1002.AutoScaleMode.none hpage1002.text="page 2" hpage1002.PageIndex=1002 --Create a DotNet uitablecontrol htab = dotNetObject "Sunny.UI.UITabControl" htab.size = dotNetObject "System.Drawing.Size" 30 30 htab.location = dotNetObject "System.Drawing.Point" 160 150 hForm.topmost = true hForm.text="UIform" hForm.AutoScaleMode=hForm.AutoScaleMode.none hForm.ShowDragStretch =true hForm.BackColor=(dotnetclass "System.Drawing.Color").FromArgb 255 255 255 255 --add controls hForm.controls.add mButton hForm.controls.add UIlabel1001 hForm.controls.add page1001Button hForm.controls.add page1002Button hForm.controls.add uiNavbar1 hForm.controls.add htab hForm.AddPage hpage1001 hForm.SelectPage 1001 hForm.AddPage hpage1002 hForm.SelectPage 1002 hForm.MainTabControl=htab --change the style --Add an Event Handler for the click event dotNet.addEventHandler mButton "click" whenButtonIsPressed page1001Button.parent=hpage1001 page1002Button.parent=hpage1002 UIlabel1001.parent=hpage1001 hForm.show() --show the Form with the Button /* showproperties hForm show aside showevents mButton dotnet.showConstructors mButton hForm.Region hForm.controls.count hForm.controls.item[0] createDialog (dotNetObject "Sunny.UI.UIMessageDialog") */ /* AsideHeaderMain = dotNetObject "Sunny.UI.UIAsideHeaderMainFrame" --AsideHeaderMain.controls.clear() AsideHeaderMain.show() AsideHeaderMain.controls.count --AsideHeaderMain.controls.item[0].backcolor=(dotnetclass "System.Drawing.Color").FromArgb 255 255 0 255 --AsideHeaderMain.controls.item[1].backcolor=(dotnetclass "System.Drawing.Color").FromArgb 255 0 255 255 --AsideHeaderMain.controls.item[2].backcolor=(dotnetclass "System.Drawing.Color").FromArgb 255 255 255 0 for i=0 to AsideHeaderMain.controls.count-1 do AsideHeaderMain.controls.item[i].BringToFront() AsideHeaderMain.AddPage (dotNetObject "Sunny.UI.UIPage") AsideHeaderMain.AddPage (dotNetObject "Sunny.UI.UIPage") showmethods AsideHeaderMain */