Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 22nd, 2007, 11:37 AM
Authorized User
 
Join Date: Feb 2007
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Default How to Open Existing Winform inside Tab Page

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 ?

Thanks,
Maulik

 
Old May 23rd, 2007, 11:27 PM
Authorized User
 
Join Date: May 2006
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to notrosh
Default

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.

hope that helps.

-zd
 
Old May 24th, 2007, 10:05 AM
Authorized User
 
Join Date: Feb 2007
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.

Thanks again.
Regards,
Maulik






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to open an existing query in VBA michael193nj Access VBA 4 March 26th, 2008 05:09 PM
WinForm Resizing instantiated form inside Tab Page maulik33 C# 4 June 13th, 2007 01:48 PM
Handling Non-Existing Web Files with Workbook.Open white_wulff Excel VBA 1 May 14th, 2007 03:07 PM
Chapter 2 Converting an Existing Page NJJim BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 5 November 6th, 2006 04:46 AM
Connect to existing access page Ronaldx Java Basics 0 November 9th, 2005 08:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.