toothyXdip Posted April 6, 2007 Posted April 6, 2007 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 ---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝'''║'''╝╝║'''║......║'''║'''║'''║'''''''''║'''''''''║'''║---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''╝''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝
Alek Posted April 6, 2007 Posted April 6, 2007 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]
toothyXdip Posted April 6, 2007 Author Posted April 6, 2007 oooo so its kinda just like having a lable and adding to the position of it...hey this answers another question i have Thanks!!! ---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝'''║'''╝╝║'''║......║'''║'''║'''║'''''''''║'''''''''║'''║---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''╝''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝
therks Posted April 6, 2007 Posted April 6, 2007 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. My AutoIt Stuff | My Github
Valuater Posted April 6, 2007 Posted April 6, 2007 (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 onhttp://www.autoitscript.com/forum/index.ph...st&p=319516 8) Edited April 6, 2007 by Valuater
therks Posted April 6, 2007 Posted April 6, 2007 Neat. I don't suppose there's a way to enable XP style for a GUI when classic style is turned on? My AutoIt Stuff | My Github
Valuater Posted April 6, 2007 Posted April 6, 2007 (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 April 6, 2007 by Valuater
therks Posted April 7, 2007 Posted April 7, 2007 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 My AutoIt Stuff | My Github
SalazarCheats Posted April 7, 2007 Posted April 7, 2007 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
Alek Posted April 7, 2007 Posted April 7, 2007 How do u make that progress bar move slowerchangesleep(1)tosleep(10) or sleep(100) [font="Impact"]Never fear, I is here.[/font]
Charus Posted May 26, 2007 Posted May 26, 2007 how can i make the progress bar to move to real copy paste time?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now