OnClick .
SpeedButton3 :
void __fastcall TForm1::SpeedButton3Click(TObject *Sender)
{
if (OpenDialog1->Execute()) Memo1->Lines->LoadFromFile(OpenDialog1->FileName);
StatusBar1->Panels->Items[0]->Text=OpenDialog1->FileName;
}
SpeedButton5 .
void __fastcall TForm1::SpeedButton5Click(TObject *Sender)
{
if (SaveDialog1->Execute()) Memo1->Lines->SaveToFile(SaveDialog1->FileName);
StatusBar1->Panels->Items[0]->Text=SaveDialog1->FileName;
}
SpeedButton2 . , , , . , - . Windows API MessageBox, :
hWnd | - (, 0) |
lpText | ( ) |
lpCaption | ( ) |
uType | ( , , MB_OK, MB_ABORTRETRYIGNORE .) - Borland C++ Builder |
MessageBox - , : IDABORT, IDCANCEL, IDIGNORE, IDNO, IDOK, IDRETRY IDYES. "" "" , "" ( - "" "Yes" - ).
SpeedButton5Click. SpeedButton2 :
void __fastcall TForm1::SpeedButton2Click(TObject *Sender)
{
if (Memo1->Lines->Count>0)
{
if (MessageBox(0," ? ",
" ",MB_YESNO)==IDYES)
{
SpeedButton5Click(Sender)
}
};
Memo1->Clear();
StatusBar1->Panels->Items[0]->Text=" ";
}
SpeedButton1 . , SpeedButton2Click:
void __fastcall TForm1::SpeedButton1Click(TObject *Sender)
{ SpeedButton2Click(Sender);
Close();
}
SpeedButton4 :
void __fastcall TForm1::SpeedButton4Click(TObject *Sender)
{
if (StatusBar1->Panels->Items[0]->Text==" ")
SpeedButton5Click(Sender);
else Memo1->Lines->SaveToFile(StatusBar1->Panels->Items[0]->Text)
}
|
|
. - , (StatusBar1), . ( ), , SpeedButton5Click.
SpeedButton6 SpeedButton7 .
void __fastcall TForm1::SpeedButton6Click(TObject *Sender)
{
Memo1->CutToClipboard();
}
//--------------------------------------------------------
void __fastcall TForm1::SpeedButton7Click(TObject *Sender)
{
Memo1->CopyToClipboard();
}
SpeedButton8 :
void __fastcall TForm1::SpeedButton8Click(TObject *Sender)
{
Memo1->PasteFromClipboard();
}
SpeedButton9 " ". . About C++ Builder. File/New Forms , New Items, AboutBox Copy. :
. 12. About..
. Form1. , . , , , . , , , , . ( Options/Project) AboutBox Available Forms (. 13)
. 13. .
SpeedButton9 :
void __fastcall TForm1::SpeedButton9Click(TObject *Sender)
{
Application->CreateForm(__classid(TAboutBox), &AboutBox);
AboutBox->ShowModal();
AboutBox->Free();
}
AboutBox. (, , ).
( SpeedButton9Click), AboutBox, .
, , . , ( Windows- - , Microsoft). , TSpeedButton ( ). .
|
|