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();
}
//---------------------------------------------------------------------------
Достарыңызбен бөлісу: |