ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> DevelopMentor-dotNET
DevelopMentor-dotNET
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.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved