Контрольная работа: Метод низпадаючої розробки структури програми
end;
procedure P5;
begin
Form1.Edit1.Text:='';
Form1.Edit2.Text:='';
Form1.Edit3.Text:='';
Form1.Edit1.SetFocus;
Form1.Height:=167;
Form1.Position:=poScreenCenter;
Form1.Label4.Visible:=False;
Form1.Label5.Visible:=False;
Form1.Label6.Visible:=False;
Form1.Label7.Visible:=False;
Form1.StringGrid1.Visible:=False;
Form1.ListBox1.Items.Clear;
Form1.Memo1.Lines.Clear;
Form1.ListBox1.Visible:=False;
Form1.Memo1.Visible:=False;
end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
case Key of
'0'..'9',Chr(8):;
'-': if (pos('-',Edit1.Text)= 0) and (length(Edit1.Text) = 0)
Then Key := '-'
else Key := Chr(0);
',': if pos(',',Edit1.Text)<>0
THen Key := Chr(0);
else Key := Chr(0);