Sign in to follow this  
Followers 0
MadBoy

Progress or some animation..

7 posts in this topic

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)

Share this post


Link to post
Share on other sites



Look up GUICtrlCreateProgress in the help file.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

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 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.


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

You could use 'Splashtexton" and say like:

SplashTextOn("","Loading...", 200, 50, -1, -1, 33, "Arial", 15, 500)
That's nice idea :lmao: I'll play with it.Thanks

My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

That's nice idea :lmao: I'll play with it.Thanks

No problem :ph34r: tell me how it goes Edited by Paulie

Share this post


Link to post
Share on other sites

No problem :lmao: tell me how it goes

I'll use it in my program :ph34r: 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 :geek: Thanks again


My little company: Evotec (PL version: Evotec)

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