MadBoy Posted October 7, 2006 Share Posted October 7, 2006 Hello, I was wondering since that little WMI call takes like 10-20 seconds or sometimes more is tehre a way to add progress bar (i find it impossible here from what i saw in other programs so far, but maybe i'm wrong ) or some kinda Animation so user knows program is doing something? $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
Fossil Rock Posted October 7, 2006 Share Posted October 7, 2006 Look up GUICtrlCreateProgress in the help file. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
MadBoy Posted October 7, 2006 Author Share Posted October 7, 2006 Look up GUICtrlCreateProgress in the help file.Well you misinterpreted my question i think. WHen you will create progress bar for progress bar to work you gotta update it's values so it changes from 1% to 5% and so on. How you want to do that if WMI call is in progress and you can't realy intercept it and put GUICtrlSetData ($progressbar1,$i), So you can just1. Put 0% on start and when it ends just put 100% there but then what's the use of progress bar. That's why i don't see how it would work here.2. I tried $ani1 = GUICtrlCreateAvi (@SystemDir & "\shell32.dll",150, 50,10) but it acts weird. I can see it being created on my GUI .. then i see that WMI process is taking place (as i update status bar info / log window that it starts and i can clearly see my computer working on that WMI process) and then for like 15 seconds avi animation isn't doing anything. After a while (10-15seconds) i see speeded up animation going (for like 2seconds) on .. and then it goes normally until process ends. But maybe there's better way to achieve it?I even thought just now to create another process that will be started that will do animation work and when process is done i would just kill it. My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
Paulie Posted October 7, 2006 Share Posted October 7, 2006 Well you misinterpreted my question i think. WHen you will create progress bar for progress bar to work you gotta update it's values so it changes from 1% to 5% and so on. How you want to do that if WMI call is in progress and you can't realy intercept it and put GUICtrlSetData ($progressbar1,$i), So you can just 1. Put 0% on start and when it ends just put 100% there but then what's the use of progress bar. That's why i don't see how it would work here. 2. I tried $ani1 = GUICtrlCreateAvi (@SystemDir & "\shell32.dll",150, 50,10) but it acts weird. I can see it being created on my GUI .. then i see that WMI process is taking place (as i update status bar info / log window that it starts and i can clearly see my computer working on that WMI process) and then for like 15 seconds avi animation isn't doing anything. After a while (10-15seconds) i see speeded up animation going (for like 2seconds) on .. and then it goes normally until process ends. But maybe there's better way to achieve it? I even thought just now to create another process that will be started that will do animation work and when process is done i would just kill it.You could use 'Splashtexton" and say like: SplashTextOn("","Loading...", 200, 50, -1, -1, 33, "Arial", 15, 500) Link to comment Share on other sites More sharing options...
MadBoy Posted October 7, 2006 Author Share Posted October 7, 2006 You could use 'Splashtexton" and say like: SplashTextOn("","Loading...", 200, 50, -1, -1, 33, "Arial", 15, 500) That's nice idea I'll play with it.Thanks My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
Paulie Posted October 7, 2006 Share Posted October 7, 2006 (edited) That's nice idea I'll play with it.ThanksNo problem tell me how it goes Edited October 7, 2006 by Paulie Link to comment Share on other sites More sharing options...
MadBoy Posted October 7, 2006 Author Share Posted October 7, 2006 No problem tell me how it goesI'll use it in my program Maybe later on i will change it to some nifty logo (with text Loading.. on that logo) that someone maybe will do for my proggy Thanks again My little company: Evotec (PL version: Evotec) 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