How can I programmatically create Enter button press in .NET WinForms? I want on TextChanged event initialize Enter button press without user interrupt.
Thanks
How can I programmatically create Enter button press in .NET WinForms? I want on
Share
System.Windows.Forms.ButtonPerformClickThat will perform a click on myButton. I’d look into why you need to fake a button click, perhaps you could refactor to avoid this?
EDIT:
On second thoughts, perhaps you meant the Enter key. In this case you could use:
Still look into the need for this though, it isn’t something you should normally have to do.