Winfrom embedding form in tabcontrol

Source: Internet
Author: User

Public bool tabControlCheckHave (System. windows. forms. tabControl tab, String tabName) {for (int I = 0; I <tab. tabCount; I ++) {if (tab. tabPages [I]. text = tabName) {tab. selectedIndex = I; return true;} return false;} public void Add_TabPage (string str, Form myForm) {if (tabControlCheckHave (this. tabControl1, str) {return;} else {tabControl1.TabPages. add (str); tabControl1.SelectTab (tabControl1.TabPages. count-1); myForm. formBorderStyle = FormBorderStyle. none; myForm. topLevel = false; myForm. show (); myForm. parent = tabControl1.SelectedTab; tabControl1.SelectedTab. autoScroll = true ;}} private void BindTabPage (LB002 lb) {Add_TabPage ("basic parameters", new frmTypeParameter (lb); Add_TabPage ("Model cabin ", new frmAircraftCabin (); Add_TabPage ("basic parameters", new frmTypeParameter (lb); Add_TabPage ("Model cabin", new frmAircraftCabin (lb )); add_TabPage ("bulktankjoint (); Add_TabPage (" container ", new frmContainer (); Add_TabPage (" unit ", new frmStandardUnitConfigurationInformation ()); add_TabPage ("machine supply", new frmJiGongPinInformation (lb); Add_TabPage ("oil volume index range", new frmOilIndex (lb); Add_TabPage ("Center of Gravity package range ", new frmCenterOfGravityEnvelope (); Add_TabPage ("optimal Center of Gravity range", new frmBestWeight (lb); Add_TabPage ("Allocation value", new frmBalancingValue ()); add_TabPage ("Special Project", new frmStretcherSeatInformation (); Add_TabPage ("dashboard", new frmBoardBoxes (); Add_TabPage ("side balance & side imbalance ", new frmSideOfBalance (); Add_TabPage ("class information", new frmShippingSpaceInformation (); Add_TabPage ("tail tank", new frmTailOilTank (lb ));}


This article from the "stupid bird first fly" blog, please be sure to keep this source http://20120715.blog.51cto.com/3047132/1278148

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.