button problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dawn

    button problem

    Hi,

    I have a form with 4 buttons on it. Now when the user presses enter....i
    always want the button2_click event to be fired, no matter what button was
    last clicked on by the mouse.
    However if I click on a button with the mouse....it needs to fire the event
    for the button that was clicked.
    So what i actually want to do is.....when the user clicks with his mouse on
    a button....the button_click event for that button gets fired......but when
    the user presses enter.....i always want the button2_click event to be fired
    even if another button is active at that moment.

    How do I do this?

    thanks,

    Bart.

    PS : sorry if this is confusing.....i t confuses me too ;-)


  • Morten Wennevik

    #2
    Re: button problem

    Capture keypress on the form and set e.Handled to true for enter, then
    call the function button2 uses.

    --
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

    Comment

    Working...