Monkey:
You can issue DOEVENTS periodically in the processing loop to allow the timer to fire. The problem with this, as DSum's post mentions, is that it will slow down the processing loop.
If you truly need the custom clock, you could create another instance of VFP in the background and have it handle the clock display, although you'll need to place the clock on it's own form - say 24 to 30 pixels high, the width of your main form, and abutting the bottom.
This method of course will increase memory usage, so you'll have to be carefull on machines running below XP or 2000.
The main benefit of using a separate instance is that it won't be limited by the processing loop's CPU usage. Thus, the clock will update properly and on time.
I'd encapsulate the second instance/clock in a class so it's reusable across applications.
Here's a base to start with:
_vfp.visible = .f.
o = createobject("oForm"
o.show
read events
_vfp.visible = .t.
define class oForm as form
docreate = .t.
width = 800
height = 24
top = 100
desktop = .t.
showwindow = 2
titlebar = 0
add object cmdOne as commandbutton with;
visible = .t.,;
height = 24
procedure destroy
clear events
endproc
procedure cmdOne.click
thisform.release
endproc
enddefine
You can add your custom clock/timer to the form and voila! A custom status bar not affected by the main program. Of course you'll have to position it properly and drop the status bar from your main form.
There is a major problem with this method! You'll have to create some type of methodology to allow form resizing, and since you'd be dealing with two instances of VFP, they'd need to talk to each other. And that's the big rub... The processing loop gets in the way again. I think after all this, I'll try to implement this for the fun of it.
Hope this helps,
Darrell 'We all must do the hard bits so when we get bit we know where to bite'
