ArianeSoft Forums

ArianeSoft Forums (http://forums.arianesoft.ca//index.php)
-   Support (http://forums.arianesoft.ca//forumdisplay.php?f=32)
-   -   Simple Timer (http://forums.arianesoft.ca//showthread.php?t=1583)

Flixy 01-04-2009 05:52 PM

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

Nicknack 01-05-2009 11:27 AM

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 ;)

Flixy 01-05-2009 03:48 PM

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;

Flixy 01-05-2009 03:51 PM

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


All times are GMT. The time now is 04:50 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright (c) ArianeSoft Inc.