Page 1 of 1 1
Topic Options
#205396 - 2012-06-12 10:44 PM KixForms - Animated GIF
sixdoubleo Offline
Starting to like KiXtart

Registered: 2004-02-06
Posts: 118
Loc: California, US
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...

$Form1.Show
; Do a bunch of stuff
$Form1.Hide

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?

Top
#205397 - 2012-06-12 11:27 PM Re: KixForms - Animated GIF [Re: sixdoubleo]
ShaneEP Moderator Online   content
MM club member
*****

Registered: 2002-11-29
Posts: 2119
Loc: Tulsa, OK
Check out the .Timer() control. It runs at a specified interval while the form is running, and launches whatever function you want.
Top
#205398 - 2012-06-13 12:08 AM Re: KixForms - Animated GIF [Re: ShaneEP]
sixdoubleo Offline
Starting to like KiXtart

Registered: 2004-02-06
Posts: 118
Loc: California, US
Perfect...that worked!

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


and then...

 Code:
Function CheckProcess()
  If Not Exist($PIDFile)
     $Form1.Hide
  EndIf
EndFunction


Thanks!

Top
#205399 - 2012-06-13 02:29 AM Re: KixForms - Animated GIF [Re: sixdoubleo]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
doevents also has an optional parameters doevents(1) would not halt the execution.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 308 anonymous users online.
Newest Members
Quicky76, Tonny, Kelar18, korunekosama, Varro18
17783 Registered Users

Generated in 0.05 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org