import win.ui; /*DSG{{*/ var winform = win.form(parent=...; text="aardio Form";right=349;bottom=249 ) winform.add( button={ bottom=130;right=254;left=86;top=78;font=LOGFONT( name="宋体";h=-12 );z=1;text="button";cls="button" } ) /*}}*/
winform.button.oncommand = function(id,event){ GetActiveWindow = ::User32.api("GetActiveWindow","int()")//获得当前活动窗口的句柄 MoveWindow = ::User32.api("MoveWindow","int(int hwnd,int x,int y,int nWidth,int nHeight,int bRepaint)")//设置窗口位置和大小 var hwnd = GetActiveWindow() /* *x,y分别是left和top的值,nWidth,nHeight分别是新宽和高,bRepaint为false由窗口自行决定是否重画 */ var x = 349 var y = 249 var nWidth = 800 var nHeight = 600 var bRepaint = 0 //int类型的参数 var int = MoveWindow(hwnd,x,y,nWidth,nHeight,bRepaint) win.msgbox(int,"aardio") } winform.show() win.loopMessage();
|