Ariane Soft PPL2 Pocket Programming DataMite
  #1  
Old 01-04-2009, 06:52 PM
Flixy Flixy is offline
Junior Member
 
Join Date: Jan 2009
Posts: 6
Default Simple Timer

Hello
I'm a beginner with PLL - test it today the first time - and have a question:
I want to implement a little clock. So I need a Timer to update every second a label-field.
My Form calles Form100$

I tied:
------------------------------------------------------------------------------------
proc timerproc;
....
end;

func WinMain
Global(Form100$);
...
tm$ = SetTimer(Form100$, 40, 1000, timerproc);
// I read in the forum, that 40 is the ID, 1000 is the intervall in ms
...
end;
------------------------------------------------------------------------------------
This doesn't work really, its starts the timerproc one times and then I get
an errormessage. (by the way - I Don't understand any error message)

Hope you can help me with some codelines - thank you

Flixy
Reply With Quote
  #2  
Old 01-05-2009, 12:27 PM
Nicknack's Avatar
Nicknack Nicknack is offline
Senior Member
 
Join Date: Nov 2006
Location: Germany
Posts: 527
Default

sorry i don't have much experience of timers and forms, so i can't explain it really, but here is working example by PointofLight. i hope it can help you on

Last edited by Nicknack; 01-05-2009 at 01:16 PM.
Reply With Quote
  #3  
Old 01-05-2009, 04:48 PM
Flixy Flixy is offline
Junior Member
 
Join Date: Jan 2009
Posts: 6
Question OK

Thank you
Now I have a timer :-) , but I don't now how to set the timerintervall. If there is somebody out there - please tell me how it works.

I just clickt on Events->OnTimer

My Code:
func FORM100_OnTimer(hWnd$, Msg$, wParam$, lParam$)
HandleEventParms
ListView_Add(Listview104$, "Timer" ,2); //do something
return (true);
end;
Reply With Quote
  #4  
Old 01-05-2009, 04:51 PM
Flixy Flixy is offline
Junior Member
 
Join Date: Jan 2009
Posts: 6
Smile Found it

Yes, I found it

I go to the Event OnCreate (Form) und insert following code:
SetTimer(Form100$, 20, 1000, null); // for 20 ms
Reply With Quote
Reply

Tags
problem, settimer, simple, timer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright (c) ArianeSoft Inc.
Copyright © 2009 www.ppl-lang.com - All rights reserved
Web Design by BR Web Consulting Ltd