Windows Develop Bookmark and Share   
 index > Windows Forms General > How to Pass Events for Handling To Parent Control In C# Windows Application
 

How to Pass Events for Handling To Parent Control In C# Windows Application

Hi,

I have a Form that contains a number of elements including a dataGrid, several buttons, anda user control. Although, I have defined Key Events Handling in the Main Form, it seems that the Key Events are actually being forwarded to the child control that is focused at the time the key event is executed.

Is there any way to forward events from a childcontrolto a parent?

Dwight Kulkarni  Thursday, March 02, 2006 6:26 PM

From the KeyPress event help:

To handle keyboard events only at the form level and not enable other controls to receive keyboard events, set the KeyPressEventArgs.Handled property in your form's KeyPress event-handling method to true.

HTH,

Reece Williams  Friday, March 03, 2006 4:47 AM

You can use google to search for other answers

Custom Search

More Threads

• need help . one project about SEND/RECEIVE mail
• Selecting and draging many usercontrols through a form
• Multiple MouseMove events
• Having trouble getting pizza form to compile
• Open Website from Windows application
• Passing Char Array to delphi function
• ListView images question
• When is a control created?
• Creating Water Mark Image with ASP.net
• Drawing Speeds