View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Auric__ Auric__ is offline
external usenet poster
 
Posts: 538
Default Determine closest control to MouseUp event?

Is there an easy, accurate method to determine the closest control to a
MouseUp (or MouseDown, if it's easier) event, if the user clicks on the
UserForm instead of a control? (My form will be used on a touch screen.)

My current best guess is to do it manually (so to speak): look at the
coordinates of the click, and then look at the coordinates of each control
and decide which one is closest. I'm sure it'll work, but it's going to be a
PITA, and I'm looking for something built-in, or alternately code that's
already been written. (My google-fu has failed me here.)

--
Nobody gives a damn about me, or anybody else.