#uselib "user32.dll"
#func SetTimer "SetTimer" int,int,int,int
#func KillTimer "KillTimer" int,int
#uselib "kernel32"
#cfunc GetModuleHandle "GetModuleHandleA" sptr
randomize
screen 0, 300, 100
title "ダウンロード"
oncmd gosub *OnTimer, $113
onexit goto *OnQuit
SetTimer hwnd, 1, 250, 0
hModule = GetModuleHandle("shell32")
pos 10, 2
winobj "SysAnimate32", "", , $50000000 | $2
hSysAnimate = objinfo(stat, 2)
pos 0, 80
winobj "msctls_progress32", "", , $50000000 | $1, ginfo_winx, 20
hProgress = objinfo(stat, 2)
sendmsg hSysAnimate, $464, hModule, 161
sendmsg hSysAnimate, $465, -1, -1
font MsGothic, 12
while Co < 500
wait 5
Co + rnd(5)
Message = "ダウンロードしています... " + Co + " KB/500 KB"
wend
stop
*OnTimer
if wparam = 1 {
color 255, 255, 255 :boxf 0, 60, ginfo_winx, 80
sendmsg hProgress, $402, int((100.0 / 500.0) * Co)
color
pos 0, 60
mes Message
}
return
*OnQuit
KillTimer hwnd, 1
end
こんな感じになるのかな・・・