sulfurious Posted September 13, 2006 Posted September 13, 2006 If you have a window, and a child window within that window, can you 'dock' a progress bar into either of the two? Preferably the child? The progress bar let's you put in x & y, but a. how do you find the left and top of the window/child without using coord mode b. if you moved window/child, how do you call the progress bar without recreating it Inquiring minds want to know later, Sul
Valuater Posted September 13, 2006 Posted September 13, 2006 maybe #include <GUIConstants.au3> GUICreate("My GUI") GUISetState() ProgressOn("Progress", "Title", "hello", -1, -1) While 1 $size = WinGetPos("My GUI") WinMove("Progress", "", $size[0] + 50, $size[1] + 100) Sleep(20) WEnd 8)
sulfurious Posted September 13, 2006 Author Posted September 13, 2006 Excellent !!! Here is how I am using it. expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) Opt("WinSearchChildren",1) $mg = GUICreate("My GUI",500,500) GUISetState() GUISetOnEvent($GUI_EVENT_CLOSE, "_EXIT") $but1 = GUICtrlCreateButton("button1",20,20,50,30) GUICtrlSetOnEvent($but1,"_somefunc1") $but2 = GUICtrlCreateButton("button2",100,20,50,30) GUICtrlSetOnEvent($but2,"_somefunc2") $child = GUICreate("child",300,100,30,150,$WS_POPUP,$WS_EX_MDICHILD,$mg) GUISetState() ProgressOn("Progress", "", "", -1, -1,17) While 1 $size = WinGetPos("child") WinMove("Progress", "", $size[0], $size[1]) Sleep(20) WEnd Sleep(2000) While 1 Sleep(1000) ; Idle around WEnd Func _somefunc1() $a = 0 do $a = $a + 10 ProgressSet($a,$a & " percent","doing stuff") Sleep(500) Until $a = 100 ProgressSet(""," ","") EndFunc Func _somefunc2() MsgBox(4096,"function","do more stuff") EndFunc Func _EXIT() Exit EndFunc Thanks for the tip, Sul
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