首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

Show(), hide(),晓得的帮帮忙

2013-12-05 
Show(), hide(),知道的帮帮忙5行代码,实现Form2能够下次显示的时候,界面莫非选中的是RadioButton1。求大神

Show(), hide(),知道的帮帮忙
5行代码,实现Form2能够下次显示的时候,界面莫非选中的是RadioButton1。求大神给力!

Form1.cpp内容如下:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    this->Hide();
    Form2->Show();
}

Form2.cpp内容如下:
void __fastcall TForm2::RadioButton2Click(TObject *Sender)
{
        this->Hide();
        RadioButton1->Checked = true;
        Form1->Show();
}
[解决办法]
这我的方式,我还没发现到写在一起会有错误呢..这是时机的问题!

//From1
void __fastcall TForm1::Button1Click(TObject *Sender)
{
 Form2->Visible = true;
 Form1->Visible = false;
}
//From2
//--------------------------------------------------------
void __fastcall TForm2::RadioButton2Click(TObject *Sender)
{
   Form2 -> RadioButton1 -> Checked = true;
}
//----------------------------------------------------------
void __fastcall TForm2::RadioButton2MouseUp(TObject *Sender,
      TMouseButton Button, TShiftState Shift, int X, int Y)
{
  Form1->Visible = true;
   Form2->Visible = false;

}

[解决办法]
"界面莫非选中的是RadioButton1"

没明白楼主的意思, 难道是想说: 默认选中的是RadioButton1?
[解决办法]
引用:
Quote: 引用:

如果RadioButton2获得焦点,那么RadioButton1将被选中

Form2上单击RadioButton2的时候,Form2隐藏显示Form1,下次Form2显示的时候默认选中的是RadioButton1。


你这个是要问什么呢?

热点排行