В общем проблема в том что при запуске программы F9 программа вроде запускается на долю секунды и сразу же закрывается и переходит в редактор кода, ошибок в коде не находит
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
chk16: TCheckBox;
edt1: TEdit;
chk1: TCheckBox;
chk2: TCheckBox;
chk3: TCheckBox;
chk4: TCheckBox;
chk5: TCheckBox;
chk6: TCheckBox;
chk7: TCheckBox;
chk8: TCheckBox;
chk9: TCheckBox;
chk10: TCheckBox;
chk11: TCheckBox;
chk12: TCheckBox;
chk13: TCheckBox;
chk14: TCheckBox;
chk15: TCheckBox;
rg1: TRadioGroup;
rg2: TRadioGroup;
rg3: TRadioGroup;
rg4: TRadioGroup;
rg5: TRadioGroup;
rg6: TRadioGroup;
rg7: TRadioGroup;
rg8: TRadioGroup;
rg9: TRadioGroup;
rg10: TRadioGroup;
rg11: TRadioGroup;
rg12: TRadioGroup;
rg13: TRadioGroup;
rg14: TRadioGroup;
rg15: TRadioGroup;
rg16: TRadioGroup;
btn1: TButton;
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
g:integer;
implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
begin
g:=0;
if Rg1.ItemIndex=2 then Inc(g);//подсчет баллов
if Rg2.ItemIndex=3 then Inc(g);
if Rg3.ItemIndex=1 then Inc(g);
if Rg4.ItemIndex=2 then Inc(g);
if Rg5.ItemIndex=0 then Inc(g);
if Rg6.ItemIndex=2 then Inc(g);
if Rg7.ItemIndex=1 then Inc(g);
if Rg8.ItemIndex=1 then Inc(g);
if Rg9.ItemIndex=2 then Inc(g);
if Rg10.ItemIndex=2 then Inc(g);
if rg11.ItemIndex=0 then Inc(g);
if Rg12.ItemIndex=1 then Inc(g);
if Rg13.ItemIndex=2 then Inc(g);
if Rg14.ItemIndex=3 then Inc(g);
if Rg15.ItemIndex=2 then Inc(g);
if Rg16.ItemIndex=1 then Inc(g);
if g=0 then edt1.text:='Ваша оценка 2!'; //вывод текста в результат
if g=1 then edt1.text:='Ваша оценка 2!';
if g=2 then edt1.text:='Ваша оценка 2!';
if g=3 then edt1.text:='Ваша оценка 2!';
if g=4 then edt1.text:='Ваша оценка 2!';
if g=5 then edt1.text:='Ваша оценка 2!';
if g=6 then edt1.text:='Ваша оценка 2!';
if g=7 then edt1.text:='Ваша оценка 2!';
if g=8 then edt1.text:='Ваша оценка 2!';
if g=9 then edt1.text:='Ваша оценка 3!';
if g=10 then edt1.text:='Ваша оценка 3!';
if g=11 then edt1.text:='Ваша оценка 3!';
if g=12 then edt1.text:='Ваша оценка 4!';
if g=13 then edt1.text:='Ваша оценка 4!';
if g=14 then edt1.text:='Ваша оценка 4!';
if g=15 then edt1.text:='Ваша оценка 5!';
if g=16 then edt1.text:='Ваша оценка 5!';
end;
end.
Может я что то в объект инспекторе что то не так поставил?(вроде ничего особого кроме цвета не менял)
ps: Пишу программу - тест.
pss: Один из программистов мне выдал что то типа "у тебя в потоке написано, а нужно написать по другому" но я так и не догнал что он имел в виду.