> > But seriously, Ted, what is the equivalent if you want to stick to 
> > what they consider current code?
> >
> 
> Do While MDown() in the MouseDown() event of the object 
> you're working with.
> 
> Or maybe some really arcane thing involving BindEvents() 
> tying into the Win32API Messaging APIs. I don't have time to 
> keep up with "what THEY consider current."


Drew Speedie came up with this one that I've been using and it works
just fine. I like that it speeds up when the button is held down, but I
suppose that's true do matter how it's done.


In the mousedown event:

LPARAMETERS nButton, nShift, nXCoord, nYCoord

*  abstract this code in a "Continuous Click" button
*  class -- add a custom property for the Interval
*  and use that property value below for the Interval
*  setting:

*    THIS.oCCTimer.Interval = THIS.TimerInterval

*  so that all that has to be done at the instance
*  level is set THIS.TimerInterval
*
*  add a base VFP Timer control
*  (if we've been here before, the existing THIS.oCCTimer
*  is simply overwritten)

THIS.AddProperty("oCCTimer")
THIS.oCCTimer = CREATEOBJECT("Timer")
THIS.oCCTimer.Enabled = .f.
THIS.oCCTimer.Interval = 400

*  every time THIS.oCCTimer.Timer() fires, fire
*  THIS.Click()  
*
BINDEVENT(THIS.oCCTimer,"Timer",THIS,"Click")

*  start it up

THIS.oCCTimer.Enabled = .t.



Bill


> Ted Roche



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to