鼠标指针图标样式一例
By
admin
at 2017-11-19 • 0人收藏 • 1691人看过
//鼠标指针函数演示 import win.ui; import win.ui.menu; import com.picture; /*DSG{{*/ var winform = win.form(text="光标示例";right=349;bottom=249;parent=...) winform.add( button={cls="button";text="光标等待";left=110;top=114;right=229;bottom=155;z=2}; static={cls="static";text="www.ecranesoft.com";left=93;top=41;right=266;bottom=72;align="center";color=16711680;edge=1;font=LOGFONT(name='Microsoft Sans Serif';underline=1);notify=1;transparent=1;z=1} ) /*}}*/ import win.cur; var busycur = win.cur.loadfile("C:\Users\Administrator\Desktop\gif图片\gif录制助手\res\AB-busy.ani") var normalcur = win.cur.loadfile("C:\Users\Administrator\Desktop\gif图片\gif录制助手\res\AB-normal.cur") var unavcur = win.cur.loadfile("C:\Users\Administrator\Desktop\gif图片\gif录制助手\res\AB-unav.cur") winform.button.oncommand = function(id,event){ winform.button.text = "请稍候......" winform.button.disabled = true; win.cur.endCur() win.cur.beginCur(busycur);//鼠标指针进入等待状态 win.delay(2000) win.cur.endCur();//还原鼠标指针 win.cur.setCur(normalcur); winform.button.text = "已完成" winform.button.disabled = false; } //鼠标回到窗体上时,切换鼠标为箭头 winform.wndproc = function(hwnd,message,wParam,lParam){ if(message = 0x20/*_WM_SETCURSOR*/){ win.cur.beginCur(normalcur); } } winform.static.wndproc = function(hwnd,message,wParam,lParam){ if(message = 0x200/*_WM_MOUSEMOVE*/){ win.cur.setCur(unavcur); //win.cur.beginCur(unavcur); } } winform.show(true) win.loopMessage(); return winform;
登录后方可回帖