KeyUp in MsgBox

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

    #1

    KeyUp in MsgBox

    Hi,

    I need help in the following:

    I have a base class, called frmBase, in wich I have a routine that gives to
    all form objects a handle to track the KeyUp Event of all inherited class
    object, to centralize them.

    When in the derivated class, called frmXPTO, the users press the Enter key
    ou Esc Key this routine will be called (so far so good) catches wich key was
    pressed and, if it was the Enter key it will validate each textbox text (as
    it must be).

    If the text of a textbox doesn't fill the needs it wil show a MsgBox
    indicating what's wrong (that's good).

    What's wrong is that in the MsgBox if the user presses the Enter key to
    close it, it will fire up the KeyUp handler routine, doing all again, i.e.,
    frmXPTO is derivated from frmBase, catches up the Enter key firing up the
    KeyUp handler routine.

    All this is in Windows Forms Application.

    Thanks,

    Amaro


Working...