DataGrid.ProcessKeyPreview Method (Message)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
protected override bool ProcessKeyPreview(
	ref Message m


Type: System.Windows.Forms.Message

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

Return Value

Type: System.Boolean

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.

.NET Framework
Available since 1.1
Return to top