C#Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
Dear all,
I want to open my Existing WinForm Inside Tabpage.currently Winform opens as new window and now i want same form to be part of Tab Page of Tab Control.I know i can create User Control and load it but i want entire form with header and footer to be display inside Tab Page ?
I am a little confused on your question. Are you wanting to dynamically add another tab page after an event is triggered or are you wanting to open up a new instance of a form inside a tabpage on a tab control.
I would either just add a new tab
or you could set one tab as a parent form and then open the new form up and set the tabpage as its parent form.
Thanks for reply.Yes i want open up a new instance of a form inside a tabpage on a tab control when user clicks on Action.Meanwhile searching, i found solution so posting it here..
ManageCustomerProfileView frmProfile = new ManageCustomerProfileView(MyController); // creating form instance. constructor i changed as per my reqs.
frmProfile.TopLevel = false; // This is most Important
frmProfile.SetDisplay();// setting form display style - Custome method
frmProfile.FormBorderStyle = FormBorderStyle.None;
frmProfile.Width = this.uTbPageProfile.Width;
maxTabControl.Tabs["Profile"].Visible = true;
maxTabControl.Tabs["Profile"].Selected = true;
this.uTbPageProfile.Controls.Add(frmProfilde);
frmProfile.Show();
Above code adds my existing form inside Tabpage. i need to deal with added form events from main form as added form will act as control seems and not form i guess.