//win7任务栏显示进度
import win.ui;
/*DSG{{*/
var winform = ..win.form(text="win7任务栏显示进度( 调用ITaskbarList3接口 )";right=599;bottom=399)
winform.add(
button={cls="button";text="显示任务栏进度";left=219;top=240;right=459;bottom=327;z=1}
)
/*}}*/

import com.interface.ITaskbarList3;
winform.wndproc = function(hwnd,message,wParam,lParam){
	select( message ) { 
		case _WM_TASKBARBUTTONCREATED{ 
			winform.taskbar = com.interface.ITaskbarList3.Create() 
		} 
	} 
}

winform.button.oncommand = function(id,event){
	if(!winform.taskbar) return; //XP下该值为空所有会忽略下面的代码
	
	for(i=1;10;1){ 
		winform.taskbar.SetProgressValue(winform.hwnd,i,10)
		win.delay(1000)
	}
}
 
winform.show()
win.loopMessage();
