; GLOBAL SETTINGS ===========================================================
 
#Warn
#NoEnv
#SingleInstance Force
 
WM_USER := 0x00000400
PBM_SETMARQUEE := WM_USER + 10
PBM_SETSTATE := WM_USER + 16
PBS_MARQUEE := 0x00000008
PBS_SMOOTH := 0x00000001
PBS_VERTICAL := 0x00000004
PBST_NORMAL := 0x00000001
PBST_ERROR := 0x00000002
PBST_PAUSE := 0x00000003
STAP_ALLOW_NONCLIENT := 0x00000001
STAP_ALLOW_CONTROLS := 0x00000002
STAP_ALLOW_WEBCONTENT := 0x00000004
WM_THEMECHANGED := 0x0000031A

; SCRIPT ====================================================================

Gui, +AlwaysOnTop
Gui, Margin, 5, 5
Gui, Font, s14 Bold
Gui, Add, Text, xm ym 0x200, Progressbar Examples

; ------------------------------------------------------------------------------------------------------
Gui, Add, Progress, w300 h20, 50

; ------------------------------------------------------------------------------------------------------
Gui, Add, Progress, w300 h20 hwndMARQ1 +%PBS_MARQUEE%, 50
DllCall("User32.dll\SendMessage", "Ptr", MARQ1, "Int", PBM_SETMARQUEE, "Ptr", 1, "Ptr", 50)

; ------------------------------------------------------------------------------------------------------
Gui, Add, Progress, w300 h20 BackgroundC9C9C9, 50

; ------------------------------------------------------------------------------------------------------
Gui, Add, Progress, w300 h20 BackgroundC9C9C9 hwndMARQ2 +%PBS_MARQUEE%, 50
DllCall("User32.dll\SendMessage", "Ptr", MARQ2, "Int", PBM_SETMARQUEE, "Ptr", 1, "Ptr", 50)

; ------------------------------------------------------------------------------------------------------
DllCall("uxtheme.dll\SetThemeAppProperties", "UInt", 0)
Gui, Add, Progress, w300 h20 c66EE66 hwndUTHEME, 50
;DllCall("User32.dll\SendMessage", "Ptr", UTHEME, "Int", WM_THEMECHANGED, "Ptr", 0, "Ptr", 0)
DllCall("uxtheme.dll\SetThemeAppProperties", "UInt", 7)

; ------------------------------------------------------------------------------------------------------
DllCall("uxtheme.dll\SetThemeAppProperties", "UInt", 0)
Gui, Add, Progress, w300 h20 c66EE66 hwndMARQ3 +%PBS_MARQUEE%, 50
DllCall("User32.dll\SendMessage", "Ptr", MARQ3, "Int", PBM_SETMARQUEE, "Ptr", 1, "Ptr", 50)
DllCall("uxtheme.dll\SetThemeAppProperties", "UInt", 7)

; ------------------------------------------------------------------------------------------------------
Gui, Add, Progress, w300 h20 -%PBS_SMOOTH%, 50

; ------------------------------------------------------------------------------------------------------
Gui, Add, Progress, w300 h20 hwndMARQ4 -%PBS_SMOOTH% +%PBS_MARQUEE%, 50
DllCall("User32.dll\SendMessage", "Ptr", MARQ4, "Int", PBM_SETMARQUEE, "Ptr", 1, "Ptr", 50)

; ------------------------------------------------------------------------------------------------------
Gui, Add, Progress, w300 h20 hwndPROG -%PBS_SMOOTH%, 50
DllCall("User32.dll\SendMessage", "Ptr", PROG, "Int", PBM_SETSTATE, "Ptr", PBST_NORMAL, "Ptr", 0)

; ------------------------------------------------------------------------------------------------------
Gui, Add, Progress, w300 h20 hwndPROR -%PBS_SMOOTH%, 50
DllCall("User32.dll\SendMessage", "Ptr", PROR, "Int", PBM_SETSTATE, "Ptr", PBST_ERROR, "Ptr", 0)

; ------------------------------------------------------------------------------------------------------
Gui, Add, Progress, w300 h20 hwndPROY -%PBS_SMOOTH%, 50
DllCall("User32.dll\SendMessage", "Ptr", PROY, "Int", PBM_SETSTATE, "Ptr", PBST_PAUSE, "Ptr", 0)

; ------------------------------------------------------------------------------------------------------
Gui, Show, AutoSize
return

; EXIT ======================================================================
 
Close:
GuiClose:
GuiEscape:
  exitapp

 

声明:站内资源为整理优化好的代码上传分享与学习研究,如果是开源代码基本都会标明出处,方便大家扩展学习路径。请不要恶意搬运,破坏站长辛苦整理维护的劳动成果。本站为爱好者分享站点,所有内容不作为商业行为。如若本站上传内容侵犯了原著者的合法权益,请联系我们进行删除下架。