|
|
бет | 39/62 | Дата | 08.02.2022 | өлшемі | 2,7 Mb. | | #117933 |
| Байланысты: с class stud
{public:
AnsiString fam, ati;
int tugG;
};
stud grup[10]; int n=0;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
// 'ЕНГIЗУДI ОРЫНДАУ' батырмасының коды
{
grup[n].fam=Edit1->Text;
grup[n].ati=Edit2->Text;
grup[n].tugG=StrToInt(Edit3->Text);
Memo1->Lines->Add(grup[n].fam+" "+
grup[n].ati+" "+IntToStr(grup[n].tugG));
n++;
Edit1->Clear();Edit2->Clear();Edit3->Clear();
Edit1->SetFocus();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Edit1KeyPress(TObject *Sender,
char &Key)
{
if(Key==13) Edit2->SetFocus();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Edit2KeyPress(TObject *Sender,
char &Key)
{
if(Key==13) Edit3->SetFocus();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Edit3KeyPress(TObject *Sender,
char &Key)
{
if(Key==13) Button1->SetFocus();
}
//---------------------------------------------------------------------------
Достарыңызбен бөлісу: |
|
|