Hi guyz,
need help....!!! i have tabcontrol1 in mainform1 which dynamically adds a new tabpage based on the no of times a button is clicked on the main menubar.
eg:
if tabpage1 is created dynamically, tabpage1 will be showing form2 inside it. Therz a button2 on form2 , on its clicking it should close tabpage1 along with form2 I tried this code on Form2,
Form2
---------
Button2_clickev ent
{
mainform1 obj = new mainform1();
obj.tabcontrol1 .tabpages.remov e(tabpage1);
}
it doesnt show any response.....ca nt close.......
plz help guyz........... ......urgent :(
Thanks in advance
need help....!!! i have tabcontrol1 in mainform1 which dynamically adds a new tabpage based on the no of times a button is clicked on the main menubar.
eg:
if tabpage1 is created dynamically, tabpage1 will be showing form2 inside it. Therz a button2 on form2 , on its clicking it should close tabpage1 along with form2 I tried this code on Form2,
Form2
---------
Button2_clickev ent
{
mainform1 obj = new mainform1();
obj.tabcontrol1 .tabpages.remov e(tabpage1);
}
it doesnt show any response.....ca nt close.......
plz help guyz........... ......urgent :(
Thanks in advance
Comment