I have a listview which happens to react to pressing the Enter
or Return
key. There is also a contextmenu on items. One to the menu entries opens a dialog box. When I enter something in that dialog box and press enter the dialogbox accepts the value and closes. So far everything good.
But the Enter
/Return
from that dialogbox is send back to the listview where the KeyUp
event starts. That is not intended!
Additional information: The dialogbox sets a button as AcceptButton
so that pressing Enter
in that form will automatically fire that button which itself closes the dialog with a DialogResult
.