Autor Beitrag
Cookie007
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 96

win2000 / Xp / Linux9.3
Delphi7
BeitragVerfasst: Sa 29.04.06 09:21 
Hi Leute ich habe einen Quelltext geschrieben das Programmm ist in mehrere Units gegliedert, alle tun auch was sie sollen doch Unit 5 macht mir Probleme icht habe erst alle angezeiten Fehler Korrigiert doch er scheint einfach alles zu ignorieren weder der einfache zurückbutton nocht sonst irgentetwas funktioniert
UNERKLÄRLICH !!!!

Bitte um Hilfe


DANKE
Cookie007

THX THX
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
unit Unit5;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm5 = class(TForm)
    Label6: TLabel;
    Label5: TLabel;
    Label4: TLabel;
    Label3: TLabel;
    Label2: TLabel;
    Label1: TLabel;
    ListBox2: TListBox;
    ListBox1: TListBox;
    Edit2: TEdit;
    Edit1: TEdit;
    Button2: TButton;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form5: TForm5;

implementation

uses Unit1;

{$R *.dfm}

var Emass, ergebnis, Dmass, Eanzahl: Extended;

procedure TForm5.Button1Click(Sender: TObject);
begin
  form1.show ;
  form5.hide ;
end;

procedure TForm5.Button2Click(Sender: TObject);
begin
  if listbox1.Selected[0] = true
  then Emass := (16.387)
  else if listbox1.Selected[1] = true
  then Emass :=(2.8)
  else if listbox1.Selected[2] = true
  then Emass := (76.5)
  else if listbox1.Selected[3] = true
  then Emass := (283.2)
  else if listbox1.Selected[4] = true
  then Emass := (0.000142)
  else if listbox1.Selected[5] = true
  then Emass := (0.000568)
  else if listbox1.Selected[6] = true
  then Emass := (0.004546)
  else if listbox1.Selected[7] = true
  then Emass := (0.009092)
  else if listbox1.Selected[8] = true
  then Emass := (0.03636)
  else if listbox1.Selected[9] = true
  then Emass := (0.29094)
  else if listbox1.Selected[10] = true
  then Emass := (0.1636);

  Eanzahl := StrToFloat(Edit1.text) ;
  Dmass := Eanzahl * Emass ;


  if listbox2.selected[0] = true
  then ergebnis := (Dmass * (100 * 100 *100 ))
  else if listbox2.selected[1] = true
  then ergebnis := (Dmass * (10 * 10 * 10))
  else if listbox2.selected[2] = true
  then ergebnis := (Dmass)
  else if listbox2.selected[3] = true
  then ergebnis := (dmass / (2.832 * 2.832 * 2.832))
  else if listbox2.selected[4] = true
  then ergebnis := (dmass * (1000 * 1000 *1000))
  else if listbox2.selected[5] = true
  then ergebnis := (dmass * (10 * 10 *10))  ;




   if listbox2.selected[0] = true
  then label5.Caption := 'Kubikzentimeter'
  else if listbox2.selected[1] = true
  then label5.Caption := 'Kubikdezimeter'
  else if listbox2.selected[2] = true
  then label5.Caption := 'Kubikmeter'
  else if listbox2.selected[3] = true
  then label5.Caption := 'Registertonne'
  else if listbox2.selected[4] = true
  then label5.Caption := 'Liter'
  else if listbox2.selected[5] = true
  then label5.Caption := 'Hektoliter';

   Edit2.text := FloatToStr(ergebnis)


end;





end.

_________________
Mein System : A64 2400 Clawhammer, 1534 MB Ram, 200GB Festplatte, GeForce 6600 (Gigabyte)
Warum so ein langes Gesicht auf jede Frage gibt es eine Antwort, du musst sie nur suchen.(suchfunktion)
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Sa 29.04.06 09:33 
Moin!

Ist denn das Ereignis der Buttons auch zugeordnet? (Button im Objektinspektor markieren und im Register Ereignisse nachsehen)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Cookie007 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 96

win2000 / Xp / Linux9.3
Delphi7
BeitragVerfasst: Sa 29.04.06 09:36 
danke ich habe mehrere solcher teile erstellt längeneinh. und so und kopiert scheinens nich so geklappt jetzt gehts danke

_________________
Mein System : A64 2400 Clawhammer, 1534 MB Ram, 200GB Festplatte, GeForce 6600 (Gigabyte)
Warum so ein langes Gesicht auf jede Frage gibt es eine Antwort, du musst sie nur suchen.(suchfunktion)