pressing the button without... pressing the button - mouse click?

pressing the button without... pressing the button - mouse click?

Post by ZWZhbmRhbm » Wed, 17 Dec 2008 06:50:22

I have a button on a form, which has to be pressed repeatedly an awful lot of
times (it's a quiz answer reveal button).

My question is..., can I somehow have it so the mouse can be clicked
anywhere else on the screen, or just simply clicked 'nowhere' without
explicitely having to press the button, (which is very uncomfortable after a
period of time), but still actions the button code.

I have a cordless mouse and find that I can get much more 'mileage' if I
don't hold it on the desk over the button, but say have it upside down in the
palm of my hand.

 
 
 

pressing the button without... pressing the button - mouse click?

Post by RG9yaWF » Wed, 17 Dec 2008 07:45:01

If you put a & before a given character in the button caption, you can use an
ALT-key combination to 'press' the button e.g. If caption is E&xit, then
ALT-X will press the Exit button.
You could also use the click event of any control (including the background)
to run the click event for the button.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".