Trapping screen clicks

  • Thread starter Thread starter news-server.san.rr.com
  • Start date Start date
N

news-server.san.rr.com

Is there a way to trap a screen click event for the entire screen regardless
of which control or form the cursor is on? I have a kiosk type application
with multiple controls on it and I don't want to trap every click event to
fire another event. Thanks,
 
Is there a way to trap a screen click event for the entire screen regardless
of which control or form the cursor is on? I have a kiosk type application
with multiple controls on it and I don't want to trap every click event to
fire another event. Thanks,

See the IMessageFilter interface. You'll need to create a class that
implements this interface, then use the Application.AddMessageFilter
method to install.
 
Hello,

news-server.san.rr.com said:
Is there a way to trap a screen click event for the entire screen regardless
of which control or form the cursor is on? I have a kiosk type application
with multiple controls on it and I don't want to trap every click event to
fire another event. Thanks,

You can loop through the controls on the form and add a common handler for
the event by using AddHandler. See
http://www.mvps.org/dotnet/dotnet/samples/controls/ -> "EnumerateConsols" on
how to enumerate controls.

Regards,
Herfried K. Wagner
 
Back
Top