Notifications
Announcements
No record found.
Hi,
It is possible to capture when the user click an specific key (enter) in a GP window using visual studio tools?
Thanks,
EV
set the KeyDown event on the object you are monitoring to your 'do stuff' event.
private void Enter_Click(object sender, System.Windows.Forms.KeyEventArgs e)
{
try
var s = e.KeyValue;
if (s == 13) //13 is the keyvalue for the 'Enter' key
OK.PerformClick();
}
catch (Exception err)
stuff
Thanks.
I resolve it using this.
private void SaveRecord_ValidateBeforeOriginal(object sender, System.ComponentModel.CancelEventArgs e)
If you don't want pressing enter to execute the Save button, go to User Preferences and change the Entry Key from Tab to Return.
No need for complex code.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 559 Most Valuable Professional
André Arnaud de Cal... 464 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader