import win.ui; import win.cur; /*DSG{{*/ var winform = win.form(text="aardio form";right=663;bottom=447;border="none";exmode="none") winform.add( S1={cls="static";left=0;top=0;right=24;bottom=24;bgcolor=8388736;dl=1;dt=1;notify=1;transparent=1;z=2}; S2={cls="static";left=640;top=0;right=664;bottom=24;bgcolor=8388736;dr=1;dt=1;notify=1;transparent=1;z=3}; S3={cls="static";left=0;top=424;right=24;bottom=448;bgcolor=8388736;db=1;dl=1;notify=1;transparent=1;z=4}; S4={cls="static";text="FDSFDSFDSF";left=640;top=424;right=664;bottom=448;bgcolor=8388736;db=1;dr=1;notify=1;transparent=1;z=5}; SS={cls="plus";left=0;top=0;right=664;bottom=448;background="C:\Users\Administrator\Desktop\mask.png";bkBottom=11;bkLeft=11;bkRight=11;bkTop=11;db=1;dl=1;dr=1;dt=1;notify=1;z=1} ) /*}}*/ /** 0x7F88/*_IDC_NO*/ 0x7F86/*_IDC_SIZEALL*/ 0x7F84/*_IDC_SIZEWE*/ 0x7F82/*_IDC_SIZENWSE*/; 0x7F83/*_IDC_SIZENESW*/ 0x7F85/*_IDC_SIZENS*/ 0x7F80/*_IDC_SIZE*/ 0x7F04/*_IDC_UPARROW*/ 0x7F02/*_IDC_WAIT*/ 0x7F00/*_IDC_ARROW*/ 0x7F8A/*_IDC_APPSTARTING*/ 0x7F03/*_IDC_CROSS*/ 32649/*_IDC_HAND*/ 0x7F81/*_IDC_ICON*/ 0x7F01/*_IDC_IBEAM*/ **/ curs = { 0x7F88/*_IDC_NO*/; 0x7F86/*_IDC_SIZEALL*/; 0x7F84/*_IDC_SIZEWE*/; 0x7F82/*_IDC_SIZENWSE*/; 0x7F83/*_IDC_SIZENESW*/; 0x7F85/*_IDC_SIZENS*/; 0x7F80/*_IDC_SIZE*/; 0x7F04/*_IDC_UPARROW*/; 0x7F02/*_IDC_WAIT*/; 0x7F00/*_IDC_ARROW*/; 0x7F8A/*_IDC_APPSTARTING*/; 0x7F03/*_IDC_CROSS*/; 32649/*_IDC_HAND*/; 0x7F81/*_IDC_ICON*/; 0x7F01/*_IDC_IBEAM*/; } //十字花移动 shi = win.cur.load( 0x7F86/*_IDC_SIZEALL*/ ); winform.S1.oncommand = function(id,event){ winform.hitTopleft(); } winform.S2.oncommand = function(id,event){ winform.hitTopright(); } winform.S3.oncommand = function(id,event){ winform.hitBottomleft(); } winform.S4.oncommand = function(id,event){ winform.hitBottomright(); } winform.SS.oncommand = function(id,event){ //winform.hitCaption(); } winform.S1.wndproc = function(hwnd,message,wParam,lParam){ if( message = 0x200/*_WM_MOUSEMOVE*/ ){ winform.SS.disabled = true; } if( message = 0x200/*_WM_MOUSEMOVE*/ || message = 0x201/*_WM_LBUTTONDOWN*/ ){ win.cur.setCur( win.cur.load( 0x7F82/*_IDC_SIZENWSE*/ ) ); } } winform.S2.wndproc = function(hwnd,message,wParam,lParam){ if( message = 0x200/*_WM_MOUSEMOVE*/ ){ winform.SS.disabled = true; } if( message = 0x200/*_WM_MOUSEMOVE*/ || message = 0x201/*_WM_LBUTTONDOWN*/ ){ win.cur.setCur( win.cur.load( 0x7F83/*_IDC_SIZENESW*/ ) ); } } winform.S3.wndproc = function(hwnd,message,wParam,lParam){ if( message = 0x200/*_WM_MOUSEMOVE*/ ){ winform.SS.disabled = true; } if( message = 0x200/*_WM_MOUSEMOVE*/ || message = 0x201/*_WM_LBUTTONDOWN*/ ){ win.cur.setCur( win.cur.load( 0x7F83/*_IDC_SIZENESW*/ ) ); } } winform.S4.wndproc = function(hwnd,message,wParam,lParam){ if( message = 0x200/*_WM_MOUSEMOVE*/ ){ winform.SS.disabled = true; } if( message = 0x200/*_WM_MOUSEMOVE*/ || message = 0x201/*_WM_LBUTTONDOWN*/ ){ win.cur.setCur( win.cur.load( 0x7F82/*_IDC_SIZENWSE*/ ) ); } } winform.S4.wndproc = function(hwnd,message,wParam,lParam){ if( message = 0x200/*_WM_MOUSEMOVE*/ ){ winform.SS.disabled = true; } if( message = 0x200/*_WM_MOUSEMOVE*/ || message = 0x201/*_WM_LBUTTONDOWN*/ ){ win.cur.setCur( win.cur.load( 0x7F82/*_IDC_SIZENWSE*/ ) ); } } import mouse; winform.SS.wndproc = function(hwnd,message,wParam,lParam){ if(message = 0x200/*_WM_MOUSEMOVE*/ ){ win.cur.setCur( shi ); } if( message = 0x201/*_WM_LBUTTONDOWN*/ ){ winform.hitCaption(); } } winform.setInterval( 10,function(){ x,y = mouse.getPos(); x,y = win.toClient( winform.hwnd,x,y); c1 = { 24; 24; } c2 = { winform.SS.width-24; 24; } c3 = { 24; winform.SS.height-24; } c4 = { winform.SS.width-24; winform.SS.height-24; } if( x < c1[1] && y < c1[2] || x > c2[1] && y < c2[2] || x < c3[1] && y > c3[2] || x > c4[1] && y > c4[2] ){ winform.SS.disabled = true; }else { winform.SS.disabled = false; } winform.text = x ++ "_" ++ y ++ " <-> " ++ winform.SS.width ++ "_" ++ winform.SS.height; } ); winform.transparent(178,); winform.show(); win.loopMessage();
效果基本上OK。
这个是窗体背景文件。
发表评论