How can I make a control show inherited events from System.Windows.Forms.Control

  • Thread starter Thread starter Ralph Krausse
  • Start date Start date
R

Ralph Krausse

I dropped a tab control on my form and wanted to create an event to
capture a Keypress. Looking at the events, I couldn't find a KeyPress
event, only to find it in my form. So I created it there and then
manually moved it to hook into the tab control. It all works fine but
I was wondering if there is a way that I could make the tab control
properties show the inherited events so that I could just double click
and get my event, not go thru the pain of double clicking on the form
and then moving the code.

TIA
Ralph
 
Hello Ralph,

I am using VS.NET 03, and I found the KeyPress event for the tabcontrol via VS.NET, but not the tabpage(s).


Here is the code it generated for me,

private void tabControl1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{

}

I guess the tabpage KeyPress isn't supported via VS.NET.

Best of luck!
RBischoff , your C# ally

RK> I dropped a tab control on my form and wanted to create an event to
RK> capture a Keypress. Looking at the events, I couldn't find a
RK> KeyPress event, only to find it in my form. So I created it there
RK> and then manually moved it to hook into the tab control. It all
RK> works fine but I was wondering if there is a way that I could make
RK> the tab control properties show the inherited events so that I could
RK> just double click and get my event, not go thru the pain of double
RK> clicking on the form and then moving the code.
RK>
RK> TIA
RK> Ralph
 
Back
Top