ProcessKeyPreview Method
Collapse the table of content
Expand the table of content

DataGrid.ProcessKeyPreview Method

Previews a keyboard message and returns a value indicating if the key was consumed.

[Visual Basic]
Overrides Protected Function ProcessKeyPreview( _
   ByRef m As Message _
) As Boolean
protected override bool ProcessKeyPreview(
   ref Message m
protected: bool ProcessKeyPreview(
 Message* m
protected override function ProcessKeyPreview(
   m : Message
) : Boolean;


A Message that contains data about the event. The parameter is passed by reference.

Return Value

true, if the key was consumed; otherwise, false.


This method is called by a child control when the child control receives a keyboard message. The child control calls this method before generating any keyboard events for the message. If this method returns true, the child control considers the message consumed and does not generate any keyboard events.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

DataGrid Class | DataGrid Members | System.Windows.Forms Namespace

© 2016 Microsoft