Autor Beitrag
xilos
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: So 11.03.07 15:52 
hi ich hab ein problem mit dem angehängten programm

und zwar schließt sich das programm immer wenn ich zwischen den tabs hin und her wechseln will!!!

könnt ihr mir da vll helfen??

thx jetzt schon mal
Einloggen, um Attachments anzusehen!
Blawen
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 616
Erhaltene Danke: 33

Win XP, Vista, 7
Delphi 5 Prof., BDS 2006 Prof. RAD Studio XE
BeitragVerfasst: So 11.03.07 16:11 
user profile iconxilos hat folgendes geschrieben:
hi ich hab ein problem mit dem angehängten programm

und zwar schließt sich das programm immer wenn ich zwischen den tabs hin und her wechseln will!!!

könnt ihr mir da vll helfen??

thx jetzt schon mal
Es würde mehr bringen, wenn Du statt der Exe ein wenig Quelltext posten würdest. (Ich zumindest lade EXE-Dateien nie runter...)
Vermutlich hast Du ein Ereignis falsch zugeordnet.

_________________
Es kompilert, wir können ausliefern.
Und es kompiliert wieder - das Update ist fertig - bitte 100 Euro ;-)
xilos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: So 11.03.07 16:15 
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:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, TabNotBk, StdCtrls, jpeg, ExtCtrls;

type
  TForm1 = class(TForm)
    TabbedNotebook1: TTabbedNotebook;
    LQ_Eingabe: TLabel;
    LQ_Seitea: TLabel;
    EQ_seitea: TEdit;
    LQ_Seiteb: TLabel;
    EQ_seiteb: TEdit;
    LQ_seitec: TLabel;
    EQ_seitec: TEdit;
    LQ_Ergebnis: TLabel;
    LQ_Volumen: TLabel;
    LQ_Oberflaeche: TLabel;
    LQ_Diagonale: TLabel;
    I_Quader: TImage;
    BerechnungQ: TButton;
    I_Pyramide: TImage;
    EQ_Volumen: TEdit;
    EQ_Oberflaeche: TEdit;
    EQ_Diagonale: TEdit;
    EP_seitea: TEdit;
    EP_hoeheh: TEdit;
    EP_grundflaeche: TEdit;
    EP_Volumen: TEdit;
    EP_seitenhoehe: TEdit;
    BerechnungP: TButton;
    LP_seitea: TLabel;
    LP_hoeheh: TLabel;
    LP_grundflaeche: TLabel;
    LP_Volumen: TLabel;
    LP_seitenhoehe: TLabel;
    I_Kegel: TImage;
    LP_Eingabe: TLabel;
    LP_Ergebnis: TLabel;
    EK_hoehe: TEdit;
    EK_radius: TEdit;
    EK_kante: TEdit;
    EK_grundflaeche: TEdit;
    EK_volumen: TEdit;
    EK_oberflaeche: TEdit;
    LK_hoeheh: TLabel;
    LK_radiusr: TLabel;
    LK_seitenkantes: TLabel;
    LK_grundflaeche: TLabel;
    LK_volumen: TLabel;
    LK_oberflaeche: TLabel;
    LK_eingabe: TLabel;
    LK_ergebnis: TLabel;
    BerechnungK: TButton;
    ImageZylinder: TImage;
    EZ_hoehe: TEdit;
    EZ_radius: TEdit;
    EZ_grundflaeche: TEdit;
    EZ_volumen: TEdit;
    EZ_oberflaeche: TEdit;
    BerechnungZ: TButton;
    LZ_hoehe: TLabel;
    LZ_radius: TLabel;
    LZ_grundflaeche: TLabel;
    LZ_volumen: TLabel;
    LZ_oberflaeche: TLabel;
    LZ_eingabe: TLabel;
    LZ_ergebnis: TLabel;
    EndeQ: TButton;
    EndeP: TButton;
    EndeK: TButton;
    EndeZ: TButton;
    procedure BerechnungQClick(Sender: TObject);
    procedure BerechnungPClick(Sender: TObject);
    procedure BerechnungKClick(Sender: TObject);
    procedure BerechnungZClick(Sender: TObject);
    procedure EndeQClick(Sender: TObject);
    procedure TabbedNotebook1Change(Sender: TObject; NewTab: Integer;
      var AllowChange: Boolean);
    procedure EndeKClick(Sender: TObject);
    procedure EndeZClick(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.BerechnungQClick(Sender: TObject);
var a, b, c, v, o, e: real;
begin

a := strtofloat (EQ_seitea.Text);
b := strtofloat (EQ_seiteb.Text);
c := strtofloat (EQ_seitec.Text);

v := round((a*b*c)*100)/100;
o := round(2*(a*b+a*c+b*c)*100)/100;
e := round(sqrt(sqr(a)+sqr(b)+sqr(c))*100)/100;

EQ_Volumen.Text     := floattostr(v);
EQ_Oberflaeche.Text := floattostr(o);
EQ_Diagonale.Text   := floattostr(e);

end;

procedure TForm1.BerechnungPClick(Sender: TObject);
var a, h, G, V, hs: real;
begin

a := strtofloat (EP_seitea.Text);
h := strtofloat (EP_hoeheh.Text);

G   := round((sqr(a))*100)/100;
V   := round((1/3*a*a*h)*100)/100;
hs  := round((sqrt(sqr(a/2)+sqr(h)))*100)/100;

EP_Grundflaeche.Text  := floattostr(G);
EP_volumen.Text       := floattostr(V);
EP_seitenhoehe.Text   := floattostr(hs);
end;

procedure TForm1.BerechnungKClick(Sender: TObject);
var h, r, s, G, V, O: real;
begin
h := strtofloat (EK_hoehe.Text);
r := strtofloat (EK_radius.Text);
s := strtofloat (EK_kante.Text);

G := round((pi*r*r)*100)/100;
V := round((pi/3*r*r*h)*100)/100;
O := round((pi*r*(r+s))*100)/100;

EK_grundflaeche.Text  := floattostr(G);
EK_Volumen.Text       := floattostr(V);
EK_oberflaeche.Text   := floattostr(O);
end;

procedure TForm1.BerechnungZClick(Sender: TObject);
var h, r, G, V, O: real;
begin
h := strtofloat (EZ_hoehe.Text);
r := strtofloat (EZ_radius.Text);

G := round((pi*r*r)*100)/100;
V := round((pi*r*r*h)*100)/100;
O := round((2*pi*r*(r+h))*100)/100;

EZ_grundflaeche.Text  := floattostr(G);
EZ_volumen.Text       := floattostr(V);
EZ_oberflaeche.Text   := floattostr(O);
end;

procedure TForm1.EndeQClick(Sender: TObject);
begin
close
end;

procedure TForm1.TabbedNotebook1Change(Sender: TObject; NewTab: Integer;
  var AllowChange: Boolean);
begin
close
end;

procedure TForm1.EndeKClick(Sender: TObject);
begin
close
end;

procedure TForm1.EndeZClick(Sender: TObject);
begin
close
end;

end.


hier ist der komplette quelltext ^^
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 480

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 11.03.07 16:18 
Das Problem dürfte hieran liegen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.TabbedNotebook1Change(Sender: TObject; NewTab: Integer; 
  var AllowChange: Boolean); 
begin 
close 
end;


Warum machst du sowas?

_________________
We are, we were and will not be.
xilos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: So 11.03.07 16:18 
okay...das problem hat sich erledigt....beim hochladen des quelltextes ist es mir aufgefallen xD

trotzdem thx an alle