Jump to content
Sign in to follow this  
gr1fter

Marquee Progress Bar - make the bar width larger?

Recommended Posts

gr1fter

I can't seem to find the way to make the width of the bar that is marquee any wider that what is in the picture, which is the default size.

is there way to make it wider? Thanks

; Marquee Progress Bar for Capture and Restore Long Processes=============================================================================================
Func mprogress()
    $mprogress = GUICtrlCreateProgress(40, 205, 350, 12, BitOr ($PBS_MARQUEE,$PBS_SMOOTH))

    _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 50) ; final parameter is update time in ms

    GUISetState()
EndFunc

How it is now...

Posted Image

How I would like to make it (photoshopped)

Posted Image

Thanks,

Share this post


Link to post
Share on other sites
PsaltyDS

Shows a sliding bar of about 20% of the total width for me:

#include <GuiConstantsEx.au3>
#include <ProgressConstants.au3>
#Include <SendMessage.au3>

$hGUI = GUICreate("Test", 400, 300)
$idProgress = GUICtrlCreateProgress(20, 140, 360, 20, BitOr ($PBS_MARQUEE,$PBS_SMOOTH))
$hProgress = GUICtrlGetHandle($idProgress)
_SendMessage($hProgress, $PBM_SETMARQUEE, True, 20) ; final parameter is update time in ms
GUISetState()

Do
    Sleep(10)
Until GUIGetMsg() = $GUI_EVENT_CLOSE

It's got a fuzzy pastel eye-candy style applied by default, too (on Vista).

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
gr1fter

Shows a sliding bar of about 20% of the total width for me:

#include <GuiConstantsEx.au3>
#include <ProgressConstants.au3>
#Include <SendMessage.au3>

$hGUI = GUICreate("Test", 400, 300)
$idProgress = GUICtrlCreateProgress(20, 140, 360, 20, BitOr ($PBS_MARQUEE,$PBS_SMOOTH))
$hProgress = GUICtrlGetHandle($idProgress)
_SendMessage($hProgress, $PBM_SETMARQUEE, True, 20) ; final parameter is update time in ms
GUISetState()

Do
    Sleep(10)
Until GUIGetMsg() = $GUI_EVENT_CLOSE

It's got a fuzzy pastel eye-candy style applied by default, too (on Vista).

;)

I think this is an xp only issue, the marquee looks great in Vista/Win7. However looks bad in XP w/ Classic mode. I am forced to omit the PBS_SMOOTH for it to look right. I would like to keep SMOOTH because it looks better but i can't use a progress bar that is that thin. (in my first picture)

Share this post


Link to post
Share on other sites
PsaltyDS

If I add this line to my script (removes themes from the script's app), I get a similar issue with the small block:

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

So you might investigate themes you could apply (I don't have XP to test right now). For example:

Global $STAP_ALLOW_NONCLIENT = 0x01
Global $STAP_ALLOW_CONTROLS = 0x02
Global $STAP_ALLOW_WEBCONTENT = 0x04

DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $STAP_ALLOW_CONTROLS)

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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.