|
 | | |
| Autor | Správa |
majso
 Užívateľ
 Založený: 03.11.2006 Príspevky: 1550 Bydlisko: Prešov
 | Zaslal: Ne 07.11.10 22:42 |   |
Zdravím mám problém s Delphi, tlačidlá 3 a 4 mi nereagujú. Chybu nevypisuje žiadnu.
| kód: | unit over;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Button5: TButton;
Label6: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
private
{ Private declarations }
public
a,b,c,d:integer;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
a:=StrToInt(Edit1.text);
If a<40
Then ShowMessage(' Činnosť vyžadujúca nepretržité sústredenie alebo nerušené dorozumievanie; tvorivá činnosť. Je v norme. ');
If a>40
Then ShowMessage('Hlučnosť prekračuje povolený rozsah');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
b:=StrToInt(Edit2.text);
If b<40
Then ShowMessage(' Činnosť vyžadujúca nepretržité sústredenie alebo nerušené dorozumievanie; tvorivá činnosť. Je v norme.');
If (b>40) and (b<50)
Then ShowMessage(' Činnosť, pri ktorej dorozumievanie predstavuje dôležitú súčasťvykonávanej práce; činnosť, pri ktorej sú veľké nároky na presnosť, rýchlosť alebo pozornosť. Je v norme. ');
If (b>50)
Then ShowMessage('Hlučnosť prekračuje povolený rozsah ');
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
c:=StrToInt(Edit3.text);
If c<40
Then ShowMessage(' Činnosť vyžadujúca nepretržité sústredenie alebo nerušené dorozumievanie; tvorivá činnosť. Je v norme. ');
If (c>40) and (c<50)
Then ShowMessage(' Činnosť, pri ktorej dorozumievanie predstavuje dôležitú súčasťvykonávanej práce; činnosť, pri ktorej sú veľké nároky na presnosť, rýchlosť alebo pozornosť. Je v norme. ');
If (c>40) and (c<65)
Then ShowMessage('Činnosť rutinnej povahy, pri ktorej je dorozumievanie súčasťou vykonávanej práce; činnosť vykonávaná na základe čiastkových sluchových informácií. Je v norme. ');
If (c>65)
Then ShowMessage('Hlučnosť prekračuje povolený rozsah ');
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
d:=StrToInt(Edit4.text);
If d<40
Then ShowMessage(' Činnosť vyžadujúca nepretržité sústredenie alebo nerušené dorozumievanie; tvorivá činnosť. Je v norme. ');
If (d>40) and (d<50)
Then ShowMessage(' Činnosť, pri ktorej dorozumievanie predstavuje dôležitú súčasťvykonávanej práce; činnosť, pri ktorej sú veľké nároky na presnosť, rýchlosť alebo pozornosť. Je v norme. ');
If (d>50) and (d<65)
Then ShowMessage(' Činnosť rutinnej povahy, pri ktorej je dorozumievanie súčasťou vykonávanej práce; činnosť vykonávaná na základe čiastkových sluchových informácií. Je v norme. ');
If (d>65) and (d<80)
Then ShowMessage('Činnosť, pri ktorej sa používajú hlučné stroje a nástroje alebo ktorá je vykonávaná v hlučnom prostredí a ktorá nespĺňa podmienky zaradenia do skupín I, II alebo III. Je v norme. ');
If (d>80)
Then ShowMessage('Hlučnosť prekračuje povolený rozsah ');
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
self.Close;
end;
end.
|
 |
_________________ Oldcore user | |
   |
 |
coldak
 Skúsený užívateľ
 Založený: 29.10.2008 Príspevky: 936
 | Zaslal: Ne 07.11.10 23:28 |   |
|
  |
 |
majso
 Užívateľ
 Založený: 03.11.2006 Príspevky: 1550 Bydlisko: Prešov
 |
| kód: | object Form1: TForm1
Left = 965
Top = 392
Width = 567
Height = 373
Caption = 'Kontrola povolen'#253'ch hodn'#244't hlu'#269'nosti v dB'
Color = clHotLight
TransparentColorValue = clGreen
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 112
Top = 104
Width = 96
Height = 25
Caption = 'Kancel'#225'ria'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = 25
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label2: TLabel
Left = 48
Top = 144
Width = 162
Height = 25
Caption = 'Pr'#225'ca na mont'#225#382'i'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = 25
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label3: TLabel
Left = 88
Top = 184
Width = 123
Height = 25
Caption = 'V'#253'robn'#225' hala'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = 25
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label4: TLabel
Left = 72
Top = 224
Width = 141
Height = 25
Caption = 'Bansk'#225' chodba'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = 25
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label5: TLabel
Left = 40
Top = 32
Width = 476
Height = 30
Caption = 'Kontrola povolen'#253'ch hodn'#244't hlu'#269'nosti v dB'
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = 30
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object Label6: TLabel
Left = 240
Top = 88
Width = 115
Height = 13
Caption = 'Nameran'#233' hodnoty [dB]'
end
object Edit1: TEdit
Left = 240
Top = 104
Width = 113
Height = 21
TabOrder = 0
Text = 'Zadaj dB'
end
object Button1: TButton
Left = 368
Top = 96
Width = 137
Height = 33
Caption = 'Kontrola'
TabOrder = 1
OnClick = Button1Click
end
object Button2: TButton
Left = 368
Top = 136
Width = 137
Height = 33
Caption = 'Kontrola'
TabOrder = 2
OnClick = Button2Click
end
object Button3: TButton
Left = 368
Top = 176
Width = 137
Height = 33
Caption = 'Kontrola'
TabOrder = 3
end
object Button4: TButton
Left = 368
Top = 216
Width = 137
Height = 33
Caption = 'Kontrola'
TabOrder = 4
end
object Edit2: TEdit
Left = 240
Top = 144
Width = 113
Height = 21
TabOrder = 5
Text = 'Zadaj dB'
end
object Edit3: TEdit
Left = 240
Top = 184
Width = 113
Height = 21
TabOrder = 6
Text = 'Zadaj dB'
end
object Edit4: TEdit
Left = 240
Top = 224
Width = 113
Height = 21
TabOrder = 7
Text = 'Zadaj dB'
end
object Button5: TButton
Left = 384
Top = 296
Width = 113
Height = 25
Caption = 'Storno'
TabOrder = 8
OnClick = Button5Click
end
end |
// pridané po 1 minúte od posledného príspevku
chýba tam OnClick = Button2Click
// pridané po 3 minútach od posledného príspevku
okej už to ide díky  |
_________________ Oldcore user | |
   |
 |
|
Nemôžete pridávať nové témy do tohto fóra. Nemôžete odpovedať na témy v tomto fóre. Nemôžete upravovať svoje príspevky v tomto fóre. Nemôžete mazať svoje príspevky v tomto fóre. Nemôžete hlasovať v tomto fóre.
|
| |