How do I intercept all 'mousedown' events for a form?
If you use arrays of controls, you have a mousedown event for each array.
Then you only need to repeat your code a few times.
E.g:
Private Sub Command_Buttons_MouseDown(Index As Integer, Button As Integer,
Shift As Integer, X As Single, Y As Single)
Code for all buttons - i.e. your interception event
select case index
code for individual buttons
end select
End Sub
Same for
Private Sub Labels_MouseDown(Index As Integer, Button As Integer, Shift As
Integer, X As Single, Y As Single)
Private Sub Text_Boxes_MouseDown(Index As Integer, Button As Integer, Shift
As Integer, X As Single, Y As Single)
etc.
And of course Form_MouseDown
Quote:
> I would like to intercept all mousedown events for a form. Actually, it
> would be nice to be able to intercept them for the entire application. I
> need to be able to restart a timer every time there is a mouse-down event.
> After processing the event, it needs to be passed on to the originally
> intended control. Can someone give me a code snippet showing how to do
> this? Thanks.
> Paul Applegate