User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 375,223 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,239 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser:

[DELPHI] how to set event procedure runtime?

Join Date: Mar 2008
Posts: 7
Reputation: mfran2002 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mfran2002 mfran2002 is offline Offline
Newbie Poster

Re: [DELPHI] how to set event procedure runtime?

  #4  
May 8th, 2008
Maybe i've found the solution to my problem using API function SetTimer with TimerProc CALLBACK but i do not know how i can use it...i need an example to follow...

UINT SetTimer(
HWND hWnd, // handle of window for timer messages
UINT nIDEvent, // timer identifier
UINT uElapse, // time-out value
TIMERPROC lpTimerFunc // address of timer procedure
);

VOID CALLBACK TimerProc(
HWND hwnd, // handle of window for timer messages
UINT uMsg, // WM_TIMER message
UINT idEvent, // timer identifier
DWORD dwTime // current system time
);

to execute every 2000 msec my procedure TMyTimer.TimerEvent(Sender:TObject)

i'm trying to use this statement:
SetTimer(0, 0, 2000, addr(Timer1.TimerEvent(Timer1)));

but i get this error:
VARIABLE REQUIRED

???!?!?!?
where? when? why?
AAAAAHHHHHHHHHHHHHHHH
help me please!!!!
Reply With Quote  
All times are GMT -4. The time now is 3:39 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC