Click here to Skip to main content
15,881,709 members

Comments by JOAT-MON (Top 197 by date)

JOAT-MON 24-Sep-13 19:00pm View    
Did you do the walk-through I posted the url to in the above comment?
JOAT-MON 5-Jun-13 3:06am View    
Nice, glad it helped :)
JOAT-MON 13-Mar-13 3:06am View    
Ok, I believe what you are looking for is:

// if your Button.Click event is handled inside the scope of the Main_View partial class,
// then you should be able to reference the tabControl1 object from inside
// the Button.Click event handler
private void btnExitbutton_Click ( object sender, EventArgs e)
{
tabControl1.SelectedTab.Dispose();
}

// if your Button.Click is handled inside the scope of the TabPage class,
// then you will want to use the 'this' keyword to reference the page you are on
private void btnExitbutton ( object sender, EventArgs e )
{
this.Dispose();
}

Let me know if I am misunderstanding you.
JOAT-MON 12-Mar-13 14:02pm View    
I'm sorry, I don't understand the problem that you are trying to describe. Could you please clarify? (i.e. Are you trying to communicate between two forms, two tabpages, or two files of the same class? Is the purpose of the button to dispose of the form, a single tabpage, or all the tabpages?)
JOAT-MON 4-Nov-11 18:50pm View    
Ouch, fair enough. I should have looked at the structure before submitting. My mistake.