13,825
社区成员
发帖
与我相关
我的任务
分享
void __fastcall TForm1::Button1Click(TObject *Sender)
{
//Form2->PageControl1->TabIndex=0;
Form2->PageControl1->ActivePage=Form2->TabSheet1;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
//Form2->PageControl1->TabIndex=1;
Form2->PageControl1->ActivePage=Form2->TabSheet2;
}
//---------------------------------------------------------------------------
//Form1是主窗口,Form2是子窗口
//Form1引入子窗口头文件
#include "Unit2.h"
...
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Form2->PageControl1->TabIndex=0;//TabSheet1
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Form2->PageControl1->TabIndex=1;//TabSheet2
}
//---------------------------------------------------------------------------
PageControl1->ActivePage=TabSheet2;