User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 456,234 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,745 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 2382 | Replies: 1
Reply
Join Date: Oct 2007
Posts: 20
Reputation: csy is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
csy csy is offline Offline
Newbie Poster

How to make a child form fix into a main form which panel alocated.

  #1  
Nov 14th, 2007
I am using C# 2005. How to show a child form fix into a main form which panel alocated when I click a button in main form. Thanks!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2006
Location: Bonners Ferry, ID
Posts: 280
Reputation: JerryShaw is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 39
JerryShaw JerryShaw is offline Offline
Posting Whiz in Training

Re: How to make a child form fix into a main form which panel alocated.

  #2  
Dec 9th, 2007
If you are referring to placing another form into a Panel on the Main form, this should really be done using a UserControl. However,

            Form2 fm2 = new Form2();
            fm2.TopLevel = false;
            fm2.Dock = DockStyle.Fill;
            panel1.Controls.Add(fm2);
            fm2.Show();

You can put a form into another control (such as a panel) on a TopLevel form like your main form by using the code above. You should typically set the second form's control box off, and set the Text of the second form to empty, also set the border to none.. But that is just you choice.

//Jerry
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C# Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C# Forum

All times are GMT -4. The time now is 5:08 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC