Thanks for the reply.
F5 is not a shortcut key.I tried ProcessDialogKey it didn't work
I can capture F5 if the focus is not in the grid.
It seems the issue is specific to F5 , i can capture other function keys
when the focus is in the grid.
Thanks
If I use this code for a derived datagrid, both overrides are hit when I
press F5 whether there is an active cell or not. If I add a menu handler
that uses F5 to the form holding this control, only the ProcessCmdKey is
hit. I am using .NET 1.1 and WinXP. Do you have any utilities running on
your system that might make special use of F5?
public class MyDataGrid : DataGrid
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if(keyData == Keys.F5)
Console.WriteLine("ProcessCmdKey");
return base.ProcessCmdKey (ref msg, keyData);
}
protected override bool ProcessDialogKey(Keys keyData)
{
if(keyData == Keys.F5)
Console.WriteLine("ProcessDialogKey");
return base.ProcessDialogKey (keyData);
}
}
===============================
Clay Burch, .NET MVP
Visit www.syncfusion.com for the coolest tools
> Thanks for the reply.
>
[quoted text clipped - 33 lines]
>> >
>> > Thanks
Techstudent - 04 Oct 2004 23:03 GMT
Hi Clay,
Thanks, ProcessCmdKey seems to be working. I tried this one before it didn't
work, may be i might have done some thing wrong.
Thanks for your help.
Thanks
> If I use this code for a derived datagrid, both overrides are hit when I
> press F5 whether there is an active cell or not. If I add a menu handler
[quoted text clipped - 60 lines]
> >> >
> >> > Thanks