James Posted December 31, 2007 Share Posted December 31, 2007 Hi, My latest program uses Progress Bars Anyways, my problem is that once I have set a style to it, I can't change it. I used: For $i = 1 To $_AllD[0] $Labels[$i] = GUICtrlCreateLabel(StringUpper($_AllD[$i]), 20, ($i * 20) + 140, 121, 17) $Progress[$i] = GUICtrlCreateProgress(40, ($i * 20) + 140, 121, 17, IniRead($Config_File, "Scheme", "Progress", "1")) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Progress[$i]), "wstr", "", "wstr", "") If Not FileExists($Config_File) Then GUICtrlSetColor($Progress[$i], 0x94FF00) GUICtrlSetBkColor($Progress[$i], 0xFFFFFF) ElseIf FileExists($Config_File) Then GUICtrlSetColor($Progress[$i], IniRead($Config_File, "Scheme", "Front", "")) GUICtrlSetBkColor($Progress[$i], IniRead($Config_File, "Scheme", "Back", "")) EndIf NextoÝ÷ Ù:æzØ^¦º ë,mªìjwméȺǶ«,Ëazg¡Ê'¶º%¶¬·)^°2¢çÇ~º&¶¬)Þjëh×6DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Progress[$i]), "wstr", "", "wstr", "")oÝ÷ Ù8^uçÚº[l·)^Íh*%ÒÚµêè)æÊ趦Êjw(ÚèØ^²Ü¥x(~Ø^«¢+Ù ÍÀÌØí¥5ÍôÀÌØí5}AɽÉÍÍ} ±½¬(%%9½Ð¥±á¥ÍÑÌ ÀÌØí ½¹¥}¥±¤Q¡¸($%}¥± ÉÑ ÀÌØí ½¹¥}¥±¤(%±Í($%%¹¥]É¥Ñ ÀÌØí ½¹¥}¥±°ÅÕ½ÐíM¡µÅÕ½Ðì°ÅÕ½ÐíAɽÉÍÌÅÕ½Ðì°ÅÕ½ÐìÈÅÕ½Ðì¤($%½ÈÀÌØíèôÄQ¼ÀÌØí}±±lÁt(%U% ÑɱMÑMÑå± ÀÌØíAɽÉÍÍlÀÌØíét°%¹¥I ÀÌØí ½¹¥}¥±°ÅÕ½ÐíM¡µÅÕ½Ðì°ÅÕ½ÐíAɽÉÍÌÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ð줤($%9áÐ(%¹%) ÍÀÌØí¥5ÍôÀÌØí5}AɽÉÍÍ}M½±¥(%%9½Ð¥±á¥ÍÑÌ ÀÌØí ½¹¥}¥±¤Q¡¸($%}¥± ÉÑ ÀÌØí ½¹¥}¥±¤(%±Í($%%¹¥]É¥Ñ ÀÌØí ½¹¥}¥±°ÅÕ½ÐíM¡µÅÕ½Ðì°ÅÕ½ÐíAɽÉÍÌÅÕ½Ðì°ÅÕ½ÐìÄÅÕ½Ðì¤($%½ÈÀÌØíèôÄQ¼ÀÌØí}±±lÁt($$U% ÑɱMÑMÑå± ÀÌØíAɽÉÍÍlÀÌØíét°%¹¥I ÀÌØí ½¹¥}¥±°ÅÕ½ÐíM¡µÅÕ½Ðì°ÅÕ½ÐíAɽÉÍÌÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ð줤($%9áÐ(%¹% Yet, when I try to change the style to 2 or blocks it doesn't work. However when you set the default style to 2 it works and sets them to blocks. Any ideas? Thanks, James Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted December 31, 2007 Author Share Posted December 31, 2007 Weird, it seems that it works if you restart the program. There must be away of making it change in realtime?? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted December 31, 2007 Author Share Posted December 31, 2007 Looks, like it cant be done. I looked through the helpfile, conducted lots of forum searches but they are all about controlling the data inside of them Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
DW1 Posted December 31, 2007 Share Posted December 31, 2007 As a shitty workaround have you tried deleting the Ctrl and making a new one with the correct style? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
James Posted December 31, 2007 Author Share Posted December 31, 2007 Well, thats like taking one step forward and two steps back. I have been working most of the day trying to cut down and speed up my script. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
DW1 Posted December 31, 2007 Share Posted December 31, 2007 Ah I see. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
James Posted December 31, 2007 Author Share Posted December 31, 2007 Thanks for trying though Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Siao Posted December 31, 2007 Share Posted December 31, 2007 (edited) #include <GUIConstants.au3> GUICreate("", 400, 200) $cProgbar = GUICtrlCreateProgress(40, 40, 320, 20, 0) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", " ", "wstr", " ") $cChkStyle = GUICtrlCreateCheckbox("Smooth", 80, 80, 200, 20) $i = 0 $t = @SEC GUISetState() While 1 Switch GuiGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $cChkStyle If BitAND(GUICtrlRead($cChkStyle), $GUI_CHECKED) Then GUICtrlSetStyle($cProgbar, 1) Else GUICtrlSetStyle($cProgbar, 0) Endif EndSwitch If $t <> @SEC Then $t = @SEC $i += 10 If $i > 100 Then $i = 0 GUICtrlSetData($cProgbar, $i) EndIf WEnd Edited January 1, 2008 by Siao "be smart, drink your wine" Link to comment Share on other sites More sharing options...
James Posted December 31, 2007 Author Share Posted December 31, 2007 Mine still doesn't work Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted December 31, 2007 Author Share Posted December 31, 2007 FIXED!For some strange reason I have to reset the data Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
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