Курсовая работа: Основы разработки электронного учебника
}
//---------------------------------------------------------------------------
void __fastcall TForm2::N3Click(TObject *Sender)
{
Form4->Visible=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::N7Click(TObject *Sender)
{
Form2->FindDialog1->Execute();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FindDialog1Find(TObject *Sender)
{AnsiString d;
for (i=0;i<Form2->FindDialog1->FindTextA.Length();i++)
{d=d+i;}
if (Form2->FindDialog1->Options.Contains(frFindNext)) {
SelPos=a.Pos(Form2->FindDialog1->FindTextA);
if (SelPos>0){
Memo1->SelStart=SelPos-1;
Memo1->SelLength=Form2->FindDialog1->FindTextA.Length();
a.Delete(SelPos,Form2->FindDialog1->FindTextA.Length());
a.Insert(d,SelPos);
}
else {
ShowMessage("Текст '"+Form2->FindDialog1->FindTextA+"' не найден");
a=Form2->Memo1->Lines->Text;}
Form2->SetFocus();
Form2->Memo1->SetFocus();}