press and hold onscreen finger target

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create an onscreen button that when held down will repeatedly
fire similar to the way a key on a keyboard works. Any Ideas?
 
0) Create a custom control (derived from Control)
1) In MouseDown set capture to true and start timer.
2) Fire event on every timer tick.
3) In MouseUp event release capture and kill timer.
4) In Paint draw straight or inverse depending on whether this.Capture is
set
 
Thanks...

I hate to be this guy,but ...got any sample code?
I've never created my own buttons.
 
You can create an owner-drawn button, override the OnMouseDown and OnMouseUp
methods, start the Timer in the OnMouseDown and stop it on the OnMouseUp.
 
Many thanks, I am giving it a try!



Alex Feinman said:
0) Create a custom control (derived from Control)
1) In MouseDown set capture to true and start timer.
2) Fire event on every timer tick.
3) In MouseUp event release capture and kill timer.
4) In Paint draw straight or inverse depending on whether this.Capture is
set
 
Back
Top