KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Syntax for ontTic event ?

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
MACE1
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 12 Oct 2004
Posts: 130
Location: Manchester UK

PostPosted: Sat Apr 21, 2007 12:16 am    Post subject: Syntax for ontTic event ? Reply with quote

I have figured out I need an asyncrenous event to call a function and this can only be done be constructing an event based on a timer, say 3 minutes, irrespective of other events.
Thanks to Benny69s example I am SLOWLY beginning to identify the differences between standard and .net.
I can't locate an example to help me construct this timer event...while form visible...

$Form = $System.Form()
$Form.StartPosition = 1 ;FormStartPosition_CenterScreen

Can anyone help with a timer event ?
________
ULTIMATE FIGHTER


Last edited by MACE1 on Fri Feb 18, 2011 5:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat Apr 21, 2007 12:43 am    Post subject: Reply with quote

You looking for dotnet example, heres a little clock tick thingy ...

Code:

Break On

$System = CreateObject("Kixforms.System")

$Form = $System.Form

$Label1 = $Form.Controls.Add($System.Label())
$Label1.Center
$Label1.BackColor = $System.Color.FromName("PaleGreen")
$Label1.Font = $System.Font("Courier New",12,$System.FontStyle_Bold)
$Label1.Text = @TIME

$Timer = $System.Timer
$Timer.Interval = 1000 ; msecs
$Timer.Tick = "Timer_Tick()"

$Form.Center
$Form.Show
$Timer.Start

While $Form.Visible
 $= Execute($Form.DoEvents)
Loop

Exit 0

Function Timer_Tick()

 $Label1.Text = @TIME

EndFunction
Back to top
View user's profile Send private message
MACE1
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 12 Oct 2004
Posts: 130
Location: Manchester UK

PostPosted: Sat Apr 21, 2007 8:49 am    Post subject: Reply with quote

Prompt as usual, Many thanks, just what the doctor ordered.
________
Volcano vaporizer reviews
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group