Sign in to follow this  
Followers 0
toothyXdip

solid progress bars

11 posts in this topic

ok this is more of a making the "gui look better" question. In stead of having the progress bar in little blocks, how can i have it solid if anyway.

Im almost done with me program and im starting to think of ^'ing the cool factor lmao

thanks,

toothy


---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post


Link to post
Share on other sites



is this what you are looking for??

#include <GuiConstants.au3>

$gui = GuiCreate("MyGUI", 350, 42,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
$Pic_1 = GUICtrlCreateLabel("", 10, 10, 340, 20)
GUICtrlSetBkColor($Pic_1,0x0000ff) ;color of the bar
$Label_2 = GuiCtrlCreateLabel("", 10, 10, 340, 20)
$Label_3 = GUICtrlCreateLabel("", 10, 13, 5, 15, $SS_CENTER)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GuiSetState()

do
    $msg = GuiGetMsg()
    $pos = ControlGetPos($gui,"",$Label_2)
    if $pos[0] < 340 then
        GUICtrlSetPos($Label_2,$pos[0]+((340/100)*1),10)
        GUICtrlSetPos($Label_3, 10, 13, 360,15)
        GUICtrlSetData( $Label_3, int($pos[0]/(340/100)+1) & "%")
    EndIf
    sleep(1)
    if $pos[0] = 340 then
        MsgBox(0,"test","Done!")
        exit
    EndIf
    $msg = GuiGetMsg()
until $msg = $GUI_EVENT_CLOSE

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

oooo so its kinda just like having a lable and adding to the position of it...hey this answers another question i have

Thanks!!!


---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post


Link to post
Share on other sites

You do know that the progress control has a style you can apply to it that will make it solid, right?

GUICtrlCreateProgress(x, y, w, h, $PBS_SMOOTH)

Although that doesn't work outside of classic style windows, it would be a real progress bar, and would act properly (Alek's example has a lot of flickering for me). Up to you though.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

You do know that the progress control has a style you can apply to it that will make it solid, right?

GUICtrlCreateProgress(x, y, w, h, $PBS_SMOOTH)

Although that doesn't work outside of classic style windows, it would be a real progress bar, and would act properly (Alek's example has a lot of flickering for me). Up to you though.

Actually you can do it by shutting off xp style, creating your GUI... then turn it back on

http://www.autoitscript.com/forum/index.ph...st&p=319516

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Neat. I don't suppose there's a way to enable XP style for a GUI when classic style is turned on?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Maybe...

Func ClassicStyle($OnOff = 1)   
    If $OnOff And StringInStr(@OSTYPE, "WIN32_NT") Then
        $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties")
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 3)
        Return 1
    ElseIf StringInStr(@OSTYPE, "WIN32_NT") And IsArray($XS_n) Then
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])
        $XS_n = ""
        Return 1
    EndIf
    Return 0
EndFunc

******** NOT TESTED *********

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Nope, don't think it works.

#include <GUIConstants.au3>

Dim $XS_n
ClassicStyle(0); also tried with 1

$gui = GUICreate('', 200, 200)
GUICtrlCreateButton('Button', 5, 5, 100, 25)
GUICtrlCreateProgress(5, 35, 120, 20)
GUICtrlSetData(-1, 75)
GUICtrlCreateInput('Input', 5, 65, 110, 20)

GUISetState()

While 1
     $gm = GUIGetMsg()
     Switch $gm
          Case $GUI_EVENT_CLOSE
               ExitLoop
     EndSwitch
WEnd

Func ClassicStyle($OnOff = 1)   
    If $OnOff And StringInStr(@OSTYPE, "WIN32_NT") Then
        $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties")
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 3)
        Return 1
    ElseIf StringInStr(@OSTYPE, "WIN32_NT") And IsArray($XS_n) Then
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])
        $XS_n = ""
        Return 1
    EndIf
    Return 0
EndFunc

Share this post


Link to post
Share on other sites

How do u make that progress bar move slower


Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes

Share this post


Link to post
Share on other sites

How do u make that progress bar move slower

change

sleep(1)

to

sleep(10) or sleep(100)


[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

how can i make the progress bar to move to real copy paste time?

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  
Followers 0