Hi,
It is possible to capture when the user click an specific key (enter) in a GP window using visual studio tools?
Thanks,
EV
Hi,
It is possible to capture when the user click an specific key (enter) in a GP window using visual studio tools?
Thanks,
EV
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.
Hi,
Thanks.
I resolve it using this.
private void SaveRecord_ValidateBeforeOriginal(object sender, System.ComponentModel.CancelEventArgs e)
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
}
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal...
288,768
Super User
Martin Dráb
225,985
Super User
nmaenpaa
101,148