(Starting to like KiXtart)
2012-06-12 10:44 PM
KixForms - Animated GIF

I have a KixForm that I'd like to include an animated GIF on...essentially it would animate while a certain task is occurring. The animated GIF is in a PictureBox object.

I was hoping that I could do something like...

; Do a bunch of stuff

But if you do it that way, the GIF doesn't animate. The only way I can get it to animate is to pass control to the form with

$Nul = Execute($Form1.DoEvents())

But once I do that, my script sits and waits for the form.

I'm looking for a way to do this so I can bring the form up (with animation), my script continues doing its thing, and then the form goes away when it's complete.

Can I attach some code to the form that will execute over and over and check for a file or something to know when it should close itself?

(MM club member)
2012-06-12 11:27 PM
Re: KixForms - Animated GIF

Check out the .Timer() control. It runs at a specified interval while the form is running, and launches whatever function you want.

(Starting to like KiXtart)
2012-06-13 12:08 AM
Re: KixForms - Animated GIF

Perfect...that worked!

$tmr = $System.Timer
$tmr.Tick = "CheckProcess()"
$tmr.Interval = 1000

and then...

Function CheckProcess()
  If Not Exist($PIDFile)


(KiX Master Guru)
2012-06-13 02:29 AM
Re: KixForms - Animated GIF

doevents also has an optional parameters doevents(1) would not halt the execution.