Jump to content
Sign in to follow this  
timmalos

ProgressBar Without Value

Recommended Posts

timmalos

Hello. First of all, Sorry for my bad language. I searched a lot but i did'nt find a solution for my problem, maybe because i don't know the real designation for what i'm searching.

I want to do a progressbar like in Windows 7 to wait, without value like in the picture beside.

Posted Image

It could be easy to do this with a gif and gdi+ but i would to integrate with seven and i think its possible to use some dlls or others to make this.

Just like Windows, i need to wait 10 secs before the real progress to start.

Thanks a lot.

Edited by timmalos

Share this post


Link to post
Share on other sites
timmalos

After some searchs i wrote this but its very ugly

$GUI = GUICreate("Installer", 400, 163)
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
Local Const $PBS_MARQUEE = 0x08
Local $Progress1 = GUICtrlCreateProgress(10, 1, 378, 20, $PBS_MARQUEE)
GUISetState()
_GUICtrlSetMarqueeProgress($Progress1, 1, 100)
Sleep(5000)
_GUICtrlSetMarqueeProgress($Progress1, 0)
Sleep(1000)
Exit

Func _GUICtrlSetMarqueeProgress($h_Progress, $f_Mode = 1, $i_Time = 100)
    Local Const $WM_USER = 0x0400
    Local Const $PBM_SETMARQUEE = ($WM_USER + 10)

    Local $var = GUICtrlSendMsg($h_Progress, $PBM_SETMARQUEE, $f_Mode, Number($i_Time))
    If $var = 0 Then
        SetError(1)
        Return 0
    Else
        SetError(0)
        Return $var
    EndIf
EndFunc;==>_GUICtrlSetMarqueeProgress

Share this post


Link to post
Share on other sites
ProgAndy

SetThemeAppProperties is not required for the default theme. Only unsigned themes do not support marquee, but i can't see the reason


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
TheDJSIR

Hey timmalos.

If you just delete this line :

DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)

It's good !

Share this post


Link to post
Share on other sites
TheDJSIR
Deleted by User Edited by TheDJSIR

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.