Re: Win32Lib; Timed events
- Posted by ZNorQ <znorq at holhaug??om> May 16, 2008
- 690 views
CChris wrote: > > ZNorQ wrote: > > > > > > I have a couple of questions in regards to timed events in Win32Lib; > > > > a) Why wont this code example work? (PS! The mbox is just another form of > > message_box, > > and it works - this isn't the problem.) > > > > procedure evnTIM_Timer (integer hControl, integer hEvent, sequence > > uParameters) > > mbox("5 seconds just passed...") > > end procedure > > setTimer(fmMAF, 12, 5000) > > setHandler(12, w32HTimer, routine_id("evnTIM_Timer")) > > > > b) Is it possible to create timers that aren't 'linked' to a window? > > > > Kenneth/ZNorQ > > Of course. Any control will accept a timer AFAIK. > > As to why the message box doesn't show up: try replacing it with a > showMessage() > statement, and see if you "get the message". I use this for debugging things > where the inspected window must not lose focus to the debugger, so it > definitely > works. > > CChris It works now, not because I used the showMessage (I did, but that didn't change anything), but because I changed from timer ID 12 to 1... So, I guess you can't have 12 timers? (I don't have 12 timers, 12 was just a random number I picked for my routine..) Thank for the feedback, though.. :) Kenneth/ZNorQ