Re: [DOTNET] can a control over ride the ProcessKeyMessage?
by Adam Senn other posts by this author
Nov 15 2001 10:44PM messages near this date
[DOTNET] Stepping Through C# Code in a ClearCase Dynamic View
|
Re: [DOTNET] RTM version of VS.Net
I am experiencing a similar problem with capturing the <DEL> key inside of
a DataGrid. I have tried overriding ProcessKeyPreview, PreProcessMessage,
WndProc and others in both the form itself and my overidden DataGrid
class. I've also tried connecting to the OnKeyPress events for the
DataGridTextBoxes embedded in the DataGrid. The only time I am able to
capture messages is when the no rows or cells are selected [i.e. when it
makes no difference to me]. Does anyone know of any way to get lower than
WndProc or is this a bug in the DataGrid? Thanks in advance..
<code>
public class MyDataGrid : DataGrid
{
protected override void WndProc( ref Message msg )
{
if ( msg.Msg == 0x0100 )
{
MessageBox.Show( " WM_KEYDOWN ", " MyDataGrid" );
}
base.WndProc( ref msg );
}
</code>
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
|