import win.ui; ..ShowWindow = ::User32.api("ShowWindow","int(int hwnd,int nCmdShow)") /*DSG{{*/ var winform = ..win.form(text="MainForm";right=269;bottom=133) winform.add( button={cls="button";text="子窗口";left=61;top=39;right=200;bottom=86;z=1} ) /*}}*/ var subform = ..win.form(text="SubForm";right=200;bottom=100) subform.add( ) subform.onClose = function(hwnd,message,wParam,lParam){ ShowWindow(subform.hwnd,0x0) //显示 return 0 } winform.button.oncommand = function(id,event){ //winform.msgbox( winform.button.text ); ShowWindow(subform.hwnd,0x5) //隐藏 return 0 } winform.show() win.loopMessage();