Autor Beitrag
Rissstau Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 49



BeitragVerfasst: So 12.11.06 00:23 
soll ich ihn trotzdem reinstellen???
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: So 12.11.06 01:27 
wenn du willst das dir jemand hilft, dann ja ansonsten kannst dus auch lassen
Rissstau Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 49



BeitragVerfasst: So 12.11.06 10:35 
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:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
procedure TForm1.FormCreate(Sender: TObject);
begin
randomize;
Button7.Visible:=false;
Button8.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Label19.Visible:=false;
Label20.Visible:=false;
Label21.Visible:=false;
Label22.Visible:=false;
Label23.Visible:=false;

end;

procedure TForm1.gleicheBasis2Click(Sender: TObject);
begin
Button2.Visible:=false;
Button3.Visible:=false;
Button4.visible:=true;
Button5.Visible:=false;
Button6.Visible:=false;
Label1.Visible:=false;
Label2.Visible:=false;
Label3.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label6.visible:=false;
Label7.visible:=false;
Label8.Visible:=false;
Label9.Visible:=false;
Label10.Visible:=false;
Label11.Visible:=false;
Label12.Visible:=false;
Label13.Visible:=false;
Label14.visible:=false;
Label15.Visible:=false;
Label16.visible:=false;
Label17.visible:=false;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Edit1.Clear;
Edit2.Clear;
Edit1.Visible:=false;
Edit2.Visible:=false;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
Label1.Visible:=false;
Label20.Visible:=false;
Edit1.visible:=true;
Edit2.visible:=true;
Label3.visible:=true;
Button4.visible:=true;
Edit1.Clear;
Edit2.Clear;
Nr:=random(4)+1;
Exponent:=random(21)-10;
Exponent2:=random(21)-10;
Label8.visible:=true;
Label8.caption:=inttostr(Basis);
Label9.visible:=true;
Label9.caption:=inttostr(Exponent);
Label13.visible:=true;
Label13.caption:=inttostr(Basis);
Label10.visible:=true;
Label10.caption:=inttostr(Exponent2);
Label15.visible:=true;
Button1.visible:=true;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Button7.Visible:=false;
Button8.Visible:=false;
Label20.Visible:=false;
Label21.Visible:=false;
Label22.Visible:=false;
Label23.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Button2.Visible:=false;
Button3.Visible:=false;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Visible:=true;
Label2.Visible:=true;
try
Vergleich:=Exponent+Exponent2;
if strtoint(Edit2.Text) = Vergleich then
 begin
 Button1.Visible:=false;
 Label1.visible:=true;
 Label1.caption:='Exponent ist richtig!!';
 end
 else
 Label1.caption:='Denk nochmal gut nach!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
if (Vergleich<0) and (strtoint(Edit2.Text)=Vergleich) then
begin
 Button7.Visible:=true;
 Label20.Visible:=true;
end;
end;
procedure TForm1.gleicherExponent1Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Button1.Visible:=false;
Button3.Visible:=false;
Button4.visible:=false;
Button5.Visible:=true;
Button6.Visible:=false;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Button7.Visible:=false;
Button8.Visible:=false;
Label1.Visible:=false;
Label2.Visible:=false;
Label3.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label6.visible:=false;
Label7.visible:=false;
Label8.Visible:=false;
Label9.Visible:=false;
Label10.Visible:=false;
Label11.Visible:=false;
Label12.Visible:=false;
Label13.Visible:=false;
Label14.visible:=false;
Label15.Visible:=false;
Label16.visible:=false;
Label17.visible:=false;
Edit1.Visible:=false;
Edit2.Visible:=false;
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
Label1.Visible:=false;
Label20.Visible:=false;
Edit1.visible:=true;
Edit2.visible:=true;
Label3.visible:=true;
Button5.visible:=true;
Edit1.Clear;
Edit2.Clear;
Basis2:=random(21)-10;
Basis3:=random(21)-10;
Exponent3:=random(10)+1;
Label8.visible:=true;
Label8.caption:=inttostr(Basis2);
Label9.visible:=true;
Label9.caption:=inttostr(Exponent3);
Label13.visible:=true;
Label13.caption:=inttostr(Basis3);
Label10.visible:=true;
Label10.caption:=inttostr(Exponent3);
Label15.visible:=true;
Button2.visible:=true;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label20.Visible:=false;
Label21.Visible:=false;
Label22.Visible:=false;
Label23.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Button1.Visible:=false;
Button3.Visible:=false;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Label1.Visible:=true;
Label2.Visible:=true;
try
Vergleich2:=Basis2*Basis3;
if strtoint(Edit1.Text) = Vergleich2 then
 begin
 Button2.Visible:=false;
 Label1.visible:=true;
 Label1.caption:='Basis ist richtig!!';
 end
 else
 Label1.caption:='Denk nochmal gut nach!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
end;

procedure TForm1.PotenzeinerPotenz1Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Button1.Visible:=false;
Button2.Visible:=false;
Button4.visible:=false;
Button5.Visible:=false;
Button6.Visible:=true;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label1.Visible:=false;
Label2.Visible:=false;
Label3.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label6.visible:=false;
Label7.visible:=false;
Label8.Visible:=false;
Label9.Visible:=false;
Label10.Visible:=false;
Label11.Visible:=false;
Label12.Visible:=false;
Label13.Visible:=false;
Label14.visible:=false;
Label15.visible:=false;
Label16.visible:=false;
Label17.visible:=false;
Edit1.Visible:=false;
Edit2.Visible:=false;
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
Label1.Visible:=false;
Label20.Visible:=false;
Edit1.visible:=true;
Edit2.visible:=true;
Label3.visible:=true;
Button6.visible:=true;
Edit1.Clear;
Edit2.Clear;
Basis4:=random(10)+1;
Exponent4:=random(21)-10;
Exponent5:=random(21)-10;
Label16.visible:=true;
Label16.caption:=inttostr(Basis4);
Label17.visible:=true;
Label17.caption:=inttostr(Exponent4);
Label14.visible:=true;
Label14.caption:=inttostr(Exponent5);
Label6.visible:=true;
Label7.visible:=true;
Button3.visible:=true;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Button7.Visible:=false;
Button8.Visible:=false;
Label20.Visible:=false;
Label21.Visible:=false;
Label22.Visible:=false;
Label23.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Button2.Visible:=false;
Button1.Visible:=false;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
Label1.Visible:=true;
Label2.Visible:=true;
try
Vergleich3:=Exponent4*Exponent5;
if strtoint(Edit2.Text) = Vergleich3 then
 begin
 Label1.visible:=true;
 Label1.caption:='Exponent ist richtig!!';
 end
 else
 Label1.caption:='Denk nochmal gut nach!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
if (Vergleich3<0) and (strtoint(Edit2.Text)=Vergleich3) and (Basis4=strtoint(Edit1.Text))then
begin
 Button8.Visible:=true;
 Label20.Visible:=true;
 end
 else
 Label1.Caption:='Denk nochmal gut nach!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
end;

procedure TForm1.Button7Click(Sender: TObject);
begin
Label1.Visible:=false;
Button10.Visible:=true;
Edit3.Visible:=true;
Edit4.Visible:=true;
Edit5.Visible:=true;
Label4.Visible:=true;
Label5.Visible:=true;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
Label20.Visible:=false;
end;

procedure TForm1.Button8Click(Sender: TObject);
begin
Label1.Visible:=false;
Button11.Visible:=true;
Edit3.Visible:=true;
Edit4.Visible:=true;
Edit5.Visible:=true;
Label4.Visible:=true;
Label5.Visible:=true;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
Label20.Visible:=false;
end;

procedure TForm1.Button10Click(Sender: TObject);
begin
Label21.Visible:=true;
Label22.Visible:=true;
Label23.Visible:=true;
try
if strtoint(Edit3.Text) = 1 then
 begin
 Label21.caption:='Der Zähler ist richtig!';
 end
 else
 Label21.caption:='Denk nochmal gut nach, der Zähler ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
if strtoint(Edit4.Text) = strtoint (Edit1.Text) then
 begin
 Label22.caption:='Die Basis ist richtig!';
 end
 else
 Label22.caption:='Denk nochmal gut nach, die Basis ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
Vergleich4:= Vergleich * -1;
 if Vergleich4 = strtoint (edit5.Text) then
 begin
 Label23.Caption:='Der Exponent ist richtig';
 end
 else
 Label23.Caption:='Denk nochmal gut nach, der Exponent ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
 end;
 end;

procedure TForm1.Button11Click(Sender: TObject);
begin
Label21.Visible:=true;
Label22.Visible:=true;
Label23.Visible:=false;
try
if strtoint(Edit3.Text) = 1 then
 begin
 Label21.caption:='Der Zähler ist richtig!';
 end
 else
 Label21.caption:='Denk nochmal gut nach, der Zähler ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
if strtoint(Edit4.Text) = strtoint (Edit1.Text) then
 begin
 Label22.caption:='Die Basis ist richtig!';
 end
 else
 Label22.caption:='Denk nochmal gut nach, die Basis ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
Vergleich5:=Vergleich *-1;
 if Vergleich5 = strtoint (edit5.Text) then
 begin
 Label23.Caption:='Der Exponent ist richtig';
 end
 else
 Label23.Caption:='Denk nochmal gut nach, der Exponent ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
 end;
 end;


procedure TForm1.Hilfe1Click(Sender: TObject);
begin
Button1.Visible:=false;
Button2.Visible:=false;
Button3.Visible:=false;
Button4.Visible:=false;
Button5.Visible:=false;
Button6.Visible:=false;
Button7.Visible:=false;
Button8.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Edit1.Visible:=false;
Edit2.Visible:=false;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label1.Visible:=false;
Label2.Visible:=false;
Label3.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label6.Visible:=false;
Label7.Visible:=false;
Label8.Visible:=false;
Label9.Visible:=false;
Label10.Visible:=false;
Label11.Visible:=false;
Label12.Visible:=false;
Label13.Visible:=false;
Label14.Visible:=false;
Label15.Visible:=false;
Label16.Visible:=false;
Label17.Visible:=false;
Label18.Visible:=false;
Label19.Visible:=false;
Label20.Visible:=false;



end;
end.


Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: So 12.11.06 11:01 
Ich habe mir ihn noch nicht angekuckt aber eine ordentliche Formatierung hilft ungemein zur Fehlersuche(Zeilen einrücken usw.)
Leuchtturm

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 12.11.06 11:11 
Ähh, ich seh da nix von Memo1.Text, das hast du doch aber am Anfang geschrieben, dass da der Fehler kommt... Also wo wird der Fehler denn jetzt angezeigt, sag mal die Zeile an, wie sie hier in deinem Quelltext im Forum ist!

Dann noch was allgemeines:
Damit der Quelltext korrekt dargstellt wird, benutze bitte die Delphi-Tags, die hier jetzt user profile iconGausi für dich ergänzt hat!
Hier steht wie das geht:
www.delphi-forum.de/...ml&sub=,19,27,32
Die musst du natürlich nicht selbst tippen, du musst nur über dem Eingabefeld auf Bereiche und in diesem Fall dann auf das Plus hinter Delphi einmal vor und einmal nach dem Code schreiben klicken. Mehr dazu hier:
www.delphi-forum.de/...ml&sub=,19,27,32
Rissstau Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 49



BeitragVerfasst: So 12.11.06 11:21 
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:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
begin
procedure TForm1.FormCreate(Sender: TObject);
begin
Button7.Visible:=false;
Button8.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Label19.Visible:=false;
Label20.Visible:=false;
Label21.Visible:=false;
Label22.Visible:=false;
Label23.Visible:=false;
Memo1.Text:='Herzlich Willkommen';

end;

procedure TForm1.gleicheBasis2Click(Sender: TObject);
begin
Button2.Visible:=false;
Button3.Visible:=false;
Button4.visible:=true;
Button5.Visible:=false;
Button6.Visible:=false;
Label1.Visible:=false;
Label2.Visible:=false;
Label3.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label6.visible:=false;
Label7.visible:=false;
Label8.Visible:=false;
Label9.Visible:=false;
Label10.Visible:=false;
Label11.Visible:=false;
Label12.Visible:=false;
Label13.Visible:=false;
Label14.visible:=false;
Label15.Visible:=false;
Label16.visible:=false;
Label17.visible:=false;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Edit1.Clear;
Edit2.Clear;
Edit1.Visible:=false;
Edit2.Visible:=false;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
Label1.Visible:=false;
Label20.Visible:=false;
Edit1.visible:=true;
Edit2.visible:=true;
Label3.visible:=true;
Button4.visible:=true;
Edit1.Clear;
Edit2.Clear;
Nr:=random(4)+1;
Exponent:=random(21)-10;
Exponent2:=random(21)-10;
Label8.visible:=true;
Label8.caption:=inttostr(Basis);
Label9.visible:=true;
Label9.caption:=inttostr(Exponent);
Label13.visible:=true;
Label13.caption:=inttostr(Basis);
Label10.visible:=true;
Label10.caption:=inttostr(Exponent2);
Label15.visible:=true;
Button1.visible:=true;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Button7.Visible:=false;
Button8.Visible:=false;
Label20.Visible:=false;
Label21.Visible:=false;
Label22.Visible:=false;
Label23.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Button2.Visible:=false;
Button3.Visible:=false;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Visible:=true;
Label2.Visible:=true;
try
Vergleich:=Exponent+Exponent2;
if strtoint(Edit2.Text) = Vergleich then
 begin
 Button1.Visible:=false;
 Label1.visible:=true;
 Label1.caption:='Exponent ist richtig!!';
 end
 else
 Label1.caption:='Denk nochmal gut nach!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
if (Vergleich<0) and (strtoint(Edit2.Text)=Vergleich) then
begin
 Button7.Visible:=true;
 Label20.Visible:=true;
end;
end;
procedure TForm1.gleicherExponent1Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Button1.Visible:=false;
Button3.Visible:=false;
Button4.visible:=false;
Button5.Visible:=true;
Button6.Visible:=false;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Button7.Visible:=false;
Button8.Visible:=false;
Label1.Visible:=false;
Label2.Visible:=false;
Label3.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label6.visible:=false;
Label7.visible:=false;
Label8.Visible:=false;
Label9.Visible:=false;
Label10.Visible:=false;
Label11.Visible:=false;
Label12.Visible:=false;
Label13.Visible:=false;
Label14.visible:=false;
Label15.Visible:=false;
Label16.visible:=false;
Label17.visible:=false;
Edit1.Visible:=false;
Edit2.Visible:=false;
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
Label1.Visible:=false;
Label20.Visible:=false;
Edit1.visible:=true;
Edit2.visible:=true;
Label3.visible:=true;
Button5.visible:=true;
Edit1.Clear;
Edit2.Clear;
Basis2:=random(21)-10;
Basis3:=random(21)-10;
Exponent3:=random(10)+1;
Label8.visible:=true;
Label8.caption:=inttostr(Basis2);
Label9.visible:=true;
Label9.caption:=inttostr(Exponent3);
Label13.visible:=true;
Label13.caption:=inttostr(Basis3);
Label10.visible:=true;
Label10.caption:=inttostr(Exponent3);
Label15.visible:=true;
Button2.visible:=true;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label20.Visible:=false;
Label21.Visible:=false;
Label22.Visible:=false;
Label23.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Button1.Visible:=false;
Button3.Visible:=false;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Label1.Visible:=true;
Label2.Visible:=true;
try
Vergleich2:=Basis2*Basis3;
if strtoint(Edit1.Text) = Vergleich2 then
 begin
 Button2.Visible:=false;
 Label1.visible:=true;
 Label1.caption:='Basis ist richtig!!';
 end
 else
 Label1.caption:='Denk nochmal gut nach!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
end;

procedure TForm1.PotenzeinerPotenz1Click(Sender: TObject);
begin
Edit1.Clear;
Edit2.Clear;
Button1.Visible:=false;
Button2.Visible:=false;
Button4.visible:=false;
Button5.Visible:=false;
Button6.Visible:=true;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label1.Visible:=false;
Label2.Visible:=false;
Label3.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label6.visible:=false;
Label7.visible:=false;
Label8.Visible:=false;
Label9.Visible:=false;
Label10.Visible:=false;
Label11.Visible:=false;
Label12.Visible:=false;
Label13.Visible:=false;
Label14.visible:=false;
Label15.visible:=false;
Label16.visible:=false;
Label17.visible:=false;
Edit1.Visible:=false;
Edit2.Visible:=false;
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
Label1.Visible:=false;
Label20.Visible:=false;
Edit1.visible:=true;
Edit2.visible:=true;
Label3.visible:=true;
Button6.visible:=true;
Edit1.Clear;
Edit2.Clear;
Basis4:=random(10)+1;
Exponent4:=random(21)-10;
Exponent5:=random(21)-10;
Label16.visible:=true;
Label16.caption:=inttostr(Basis4);
Label17.visible:=true;
Label17.caption:=inttostr(Exponent4);
Label14.visible:=true;
Label14.caption:=inttostr(Exponent5);
Label6.visible:=true;
Label7.visible:=true;
Button3.visible:=true;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Button7.Visible:=false;
Button8.Visible:=false;
Label20.Visible:=false;
Label21.Visible:=false;
Label22.Visible:=false;
Label23.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Button2.Visible:=false;
Button1.Visible:=false;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
Label1.Visible:=true;
Label2.Visible:=true;
try
Vergleich3:=Exponent4*Exponent5;
if strtoint(Edit2.Text) = Vergleich3 then
 begin
 Label1.visible:=true;
 Label1.caption:='Exponent ist richtig!!';
 end
 else
 Label1.caption:='Denk nochmal gut nach!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
if (Vergleich3<0) and (strtoint(Edit2.Text)=Vergleich3) and (Basis4=strtoint(Edit1.Text))then
begin
 Button8.Visible:=true;
 Label20.Visible:=true;
 end
 else
 Label1.Caption:='Denk nochmal gut nach!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
end;

procedure TForm1.Button7Click(Sender: TObject);
begin
Label1.Visible:=false;
Button10.Visible:=true;
Edit3.Visible:=true;
Edit4.Visible:=true;
Edit5.Visible:=true;
Label4.Visible:=true;
Label5.Visible:=true;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
Label20.Visible:=false;
end;

procedure TForm1.Button8Click(Sender: TObject);
begin
Label1.Visible:=false;
Button11.Visible:=true;
Edit3.Visible:=true;
Edit4.Visible:=true;
Edit5.Visible:=true;
Label4.Visible:=true;
Label5.Visible:=true;
Edit3.Clear;
Edit4.Clear;
Edit5.Clear;
Label20.Visible:=false;
end;

procedure TForm1.Button10Click(Sender: TObject);
begin
Label21.Visible:=true;
Label22.Visible:=true;
Label23.Visible:=true;
try
if strtoint(Edit3.Text) = 1 then
 begin
 Label21.caption:='Der Zähler ist richtig!';
 end
 else
 Label21.caption:='Denk nochmal gut nach, der Zähler ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
if strtoint(Edit4.Text) = strtoint (Edit1.Text) then
 begin
 Label22.caption:='Die Basis ist richtig!';
 end
 else
 Label22.caption:='Denk nochmal gut nach, die Basis ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
Vergleich4:= Vergleich * -1;
 if Vergleich4 = strtoint (edit5.Text) then
 begin
 Label23.Caption:='Der Exponent ist richtig';
 end
 else
 Label23.Caption:='Denk nochmal gut nach, der Exponent ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
 end;
 end;

procedure TForm1.Button11Click(Sender: TObject);
begin
Label21.Visible:=true;
Label22.Visible:=true;
Label23.Visible:=false;
try
if strtoint(Edit3.Text) = 1 then
 begin
 Label21.caption:='Der Zähler ist richtig!';
 end
 else
 Label21.caption:='Denk nochmal gut nach, der Zähler ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
if strtoint(Edit4.Text) = strtoint (Edit1.Text) then
 begin
 Label22.caption:='Die Basis ist richtig!';
 end
 else
 Label22.caption:='Denk nochmal gut nach, die Basis ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
end;
try
Vergleich5:=Vergleich *-1;
 if Vergleich5 = strtoint (edit5.Text) then
 begin
 Label23.Caption:='Der Exponent ist richtig';
 end
 else
 Label23.Caption:='Denk nochmal gut nach, der Exponent ist noch nicht richtig!';
 except
 Showmessage('Du musst eine Zahl eingeben');
 end;
 end;


procedure TForm1.Hilfe1Click(Sender: TObject);
begin
Button1.Visible:=false;
Button2.Visible:=false;
Button3.Visible:=false;
Button4.Visible:=false;
Button5.Visible:=false;
Button6.Visible:=false;
Button7.Visible:=false;
Button8.Visible:=false;
Button10.Visible:=false;
Button11.Visible:=false;
Button12.Visible:=false;
Edit1.Visible:=false;
Edit2.Visible:=false;
Edit3.Visible:=false;
Edit4.Visible:=false;
Edit5.Visible:=false;
Label1.Visible:=false;
Label2.Visible:=false;
Label3.Visible:=false;
Label4.Visible:=false;
Label5.Visible:=false;
Label6.Visible:=false;
Label7.Visible:=false;
Label8.Visible:=false;
Label9.Visible:=false;
Label10.Visible:=false;
Label11.Visible:=false;
Label12.Visible:=false;
Label13.Visible:=false;
Label14.Visible:=false;
Label15.Visible:=false;
Label16.Visible:=false;
Label17.Visible:=false;
Label18.Visible:=false;
Label19.Visible:=false;
Label20.Visible:=false;



end;
end.
end;


Zuletzt bearbeitet von Rissstau am So 12.11.06 11:27, insgesamt 2-mal bearbeitet
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: So 12.11.06 11:22 
user profile iconjaenicke hat folgendes geschrieben:
...

Dann noch was allgemeines:
Damit der Quelltext korrekt dargstellt wird, benutze bitte die Delphi-Tags, die hier jetzt user profile iconGausi für dich ergänzt hat!
Hier steht wie das geht:
www.delphi-forum.de/...ml&sub=,19,27,32
Die musst du natürlich nicht selbst tippen, du musst nur über dem Eingabefeld auf Bereiche und in diesem Fall dann auf das Plus hinter Delphi einmal vor und einmal nach dem Code schreiben klicken. Mehr dazu hier:
www.delphi-forum.de/...ml&sub=,19,27,32


Was hat das randomize so alleine in der FormCreate zu suchen :?:

so geht es bei mir:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormCreate(Sender: TObject);
begin
Memo1.Text:='Herzlich Willkommen';
end;

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Rissstau Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 49



BeitragVerfasst: So 12.11.06 11:40 
so geht es bei mir:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormCreate(Sender: TObject);
begin
Memo1.Text:='Herzlich Willkommen';
end;
[/quote]

genau so hab ich es auch probiert... aber bei mir geht das nicht...
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 12.11.06 11:44 
Jedenfalls produziert der Code nicht den anfangs genannten Fehler!! (Von wegen nicht abgeschlossener String, meine ich.)
Diese Zeile funktioniert! Das heißt beim Kompilieren muss der Fehler woanders kommen.

Und diese Zeile funktioniert auch schon bei Delphi 3, ist also nichts nur bei neueren Versionen...

Häng bitte mal das gesamte Projekt als Zip oder Rar an! Oder einen Screenshot von dem Fehler in Delphi!
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: So 12.11.06 11:44 
Was macht eigentlich das begin über procedure TForm1.Create :?:
Hast du das Memo auch auf dem Formular :?:
Eigentlich müsste das gehen, zumindest unter D7PE und D3Prof

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Grenzgaenger
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 12.11.06 11:48 
so sieht dein code doch schon viel netter aus....

ausblenden volle Höhe Rissstaus's Code
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:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
PROCEDURE TForm1.FormCreate(Sender: TObject);
BEGIN
 Button7.Visible := False;
 Button8.Visible := False;
 Button10.Visible := False;
 Button11.Visible := False;
 Button12.Visible := False;
 Label19.Visible := False;
 Label20.Visible := False;
 Label21.Visible := False;
 Label22.Visible := False;
 Label23.Visible := False;
 Memo1.Text := 'Herzlich Willkommen';

END;

PROCEDURE TForm1.gleicheBasis2Click(Sender: TObject);
BEGIN
 Button2.Visible := False;
 Button3.Visible := False;
 Button4.Visible := True;
 Button5.Visible := False;
 Button6.Visible := False;
 Label1.Visible  := False;
 Label2.Visible  := False;
 Label3.Visible  := False;
 Label4.Visible  := False;
 Label5.Visible  := False;
 Label6.Visible  := False;
 Label7.Visible  := False;
 Label8.Visible  := False;
 Label9.Visible  := False;
 Label10.Visible := False;
 Label11.Visible := False;
 Label12.Visible := False;
 Label13.Visible := False;
 Label14.Visible := False;
 Label15.Visible := False;
 Label16.Visible := False;
 Label17.Visible := False;
 Edit3.Visible   := False;
 Edit4.Visible   := False;
 Edit5.Visible   := False;
 Edit1.Clear;
 Edit2.Clear;
 Edit1.Visible := False;
 Edit2.Visible := False;
END;

PROCEDURE TForm1.Button4Click(Sender: TObject);
BEGIN
 Label1.Visible  := False;
 Label20.Visible := False;
 Edit1.Visible   := True;
 Edit2.Visible   := True;
 Label3.Visible  := True;
 Button4.Visible := True;
 Edit1.Clear;
 Edit2.Clear;
 Nr := random(4) + 1;
 Exponent := random(21) - 10;
 Exponent2 := random(21) - 10;
 Label8.Visible := True;
 Label8.Caption := IntToStr(Basis);
 Label9.Visible := True;
 Label9.Caption := IntToStr(Exponent);
 Label13.Visible := True;
 Label13.Caption := IntToStr(Basis);
 Label10.Visible := True;
 Label10.Caption := IntToStr(Exponent2);
 Label15.Visible := True;
 Button1.Visible := True;
 Edit3.Visible := False;
 Edit4.Visible := False;
 Edit5.Visible := False;
 Label4.Visible := False;
 Label5.Visible := False;
 Button7.Visible := False;
 Button8.Visible := False;
 Label20.Visible := False;
 Label21.Visible := False;
 Label22.Visible := False;
 Label23.Visible := False;
 Button10.Visible := False;
 Button11.Visible := False;
 Button12.Visible := False;
 Button2.Visible := False;
 Button3.Visible := False;
END;

PROCEDURE TForm1.Button1Click(Sender: TObject);
BEGIN
 Label1.Visible := True;
 Label2.Visible := True;
 TRY
  Vergleich := Exponent + Exponent2;
  IF StrToInt(Edit2.Text) = Vergleich THEN
  BEGIN
   Button1.Visible := False;
   Label1.Visible  := True;
   Label1.Caption  := 'Exponent ist richtig!!';
  END
  ELSE
   Label1.Caption := 'Denk nochmal gut nach!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
 IF (Vergleich < 0) AND (StrToInt(Edit2.Text) = Vergleich) THEN
 BEGIN
  Button7.Visible := True;
  Label20.Visible := True;
 END;
END;

PROCEDURE TForm1.gleicherExponent1Click(Sender: TObject);
BEGIN
 Edit1.Clear;
 Edit2.Clear;
 Button1.Visible := False;
 Button3.Visible := False;
 Button4.Visible := False;
 Button5.Visible := True;
 Button6.Visible := False;
 Edit3.Visible   := False;
 Edit4.Visible   := False;
 Edit5.Visible   := False;
 Button7.Visible := False;
 Button8.Visible := False;
 Label1.Visible  := False;
 Label2.Visible  := False;
 Label3.Visible  := False;
 Label4.Visible  := False;
 Label5.Visible  := False;
 Label6.Visible  := False;
 Label7.Visible  := False;
 Label8.Visible  := False;
 Label9.Visible  := False;
 Label10.Visible := False;
 Label11.Visible := False;
 Label12.Visible := False;
 Label13.Visible := False;
 Label14.Visible := False;
 Label15.Visible := False;
 Label16.Visible := False;
 Label17.Visible := False;
 Edit1.Visible   := False;
 Edit2.Visible   := False;
END;

PROCEDURE TForm1.Button5Click(Sender: TObject);
BEGIN
 Label1.Visible  := False;
 Label20.Visible := False;
 Edit1.Visible   := True;
 Edit2.Visible   := True;
 Label3.Visible  := True;
 Button5.Visible := True;
 Edit1.Clear;
 Edit2.Clear;
 Basis2    := random(21) - 10;
 Basis3    := random(21) - 10;
 Exponent3 := random(10) + 1;
 Label8.Visible := True;
 Label8.Caption := IntToStr(Basis2);
 Label9.Visible := True;
 Label9.Caption := IntToStr(Exponent3);
 Label13.Visible := True;
 Label13.Caption := IntToStr(Basis3);
 Label10.Visible := True;
 Label10.Caption := IntToStr(Exponent3);
 Label15.Visible := True;
 Button2.Visible := True;
 Edit3.Visible := False;
 Edit4.Visible := False;
 Edit5.Visible := False;
 Label4.Visible := False;
 Label5.Visible := False;
 Label20.Visible := False;
 Label21.Visible := False;
 Label22.Visible := False;
 Label23.Visible := False;
 Button10.Visible := False;
 Button11.Visible := False;
 Button12.Visible := False;
 Button1.Visible := False;
 Button3.Visible := False;
END;

PROCEDURE TForm1.Button2Click(Sender: TObject);
BEGIN
 Label1.Visible := True;
 Label2.Visible := True;
 TRY
  Vergleich2 := Basis2 * Basis3;
  IF StrToInt(Edit1.Text) = Vergleich2 THEN
  BEGIN
   Button2.Visible := False;
   Label1.Visible  := True;
   Label1.Caption  := 'Basis ist richtig!!';
  END
  ELSE
   Label1.Caption := 'Denk nochmal gut nach!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
END;

PROCEDURE TForm1.PotenzeinerPotenz1Click(Sender: TObject);
BEGIN
 Edit1.Clear;
 Edit2.Clear;
 Button1.Visible := False;
 Button2.Visible := False;
 Button4.Visible := False;
 Button5.Visible := False;
 Button6.Visible := True;
 Edit3.Visible   := False;
 Edit4.Visible   := False;
 Edit5.Visible   := False;
 Label1.Visible  := False;
 Label2.Visible  := False;
 Label3.Visible  := False;
 Label4.Visible  := False;
 Label5.Visible  := False;
 Label6.Visible  := False;
 Label7.Visible  := False;
 Label8.Visible  := False;
 Label9.Visible  := False;
 Label10.Visible := False;
 Label11.Visible := False;
 Label12.Visible := False;
 Label13.Visible := False;
 Label14.Visible := False;
 Label15.Visible := False;
 Label16.Visible := False;
 Label17.Visible := False;
 Edit1.Visible   := False;
 Edit2.Visible   := False;
END;

PROCEDURE TForm1.Button6Click(Sender: TObject);
BEGIN
 Label1.Visible  := False;
 Label20.Visible := False;
 Edit1.Visible   := True;
 Edit2.Visible   := True;
 Label3.Visible  := True;
 Button6.Visible := True;
 Edit1.Clear;
 Edit2.Clear;
 Basis4    := random(10) + 1;
 Exponent4 := random(21) - 10;
 Exponent5 := random(21) - 10;
 Label16.Visible := True;
 Label16.Caption := IntToStr(Basis4);
 Label17.Visible := True;
 Label17.Caption := IntToStr(Exponent4);
 Label14.Visible := True;
 Label14.Caption := IntToStr(Exponent5);
 Label6.Visible := True;
 Label7.Visible := True;
 Button3.Visible := True;
 Edit3.Visible := False;
 Edit4.Visible := False;
 Edit5.Visible := False;
 Label4.Visible := False;
 Label5.Visible := False;
 Button7.Visible := False;
 Button8.Visible := False;
 Label20.Visible := False;
 Label21.Visible := False;
 Label22.Visible := False;
 Label23.Visible := False;
 Button10.Visible := False;
 Button11.Visible := False;
 Button12.Visible := False;
 Button2.Visible := False;
 Button1.Visible := False;
END;

PROCEDURE TForm1.Button3Click(Sender: TObject);
BEGIN
 Label1.Visible := True;
 Label2.Visible := True;
 TRY
  Vergleich3 := Exponent4 * Exponent5;
  IF StrToInt(Edit2.Text) = Vergleich3 THEN
  BEGIN
   Label1.Visible := True;
   Label1.Caption := 'Exponent ist richtig!!';
  END
  ELSE
   Label1.Caption := 'Denk nochmal gut nach!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
 TRY
  IF (Vergleich3 < 0) AND (StrToInt(Edit2.Text) = Vergleich3) AND
   (Basis4 = StrToInt(Edit1.Text)) THEN
  BEGIN
   Button8.Visible := True;
   Label20.Visible := True;
  END
  ELSE
   Label1.Caption := 'Denk nochmal gut nach!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
END;

PROCEDURE TForm1.Button7Click(Sender: TObject);
BEGIN
 Label1.Visible   := False;
 Button10.Visible := True;
 Edit3.Visible    := True;
 Edit4.Visible    := True;
 Edit5.Visible    := True;
 Label4.Visible   := True;
 Label5.Visible   := True;
 Edit3.Clear;
 Edit4.Clear;
 Edit5.Clear;
 Label20.Visible := False;
END;

PROCEDURE TForm1.Button8Click(Sender: TObject);
BEGIN
 Label1.Visible   := False;
 Button11.Visible := True;
 Edit3.Visible    := True;
 Edit4.Visible    := True;
 Edit5.Visible    := True;
 Label4.Visible   := True;
 Label5.Visible   := True;
 Edit3.Clear;
 Edit4.Clear;
 Edit5.Clear;
 Label20.Visible := False;
END;

PROCEDURE TForm1.Button10Click(Sender: TObject);
BEGIN
 Label21.Visible := True;
 Label22.Visible := True;
 Label23.Visible := True;
 TRY
  IF StrToInt(Edit3.Text) = 1 THEN
  BEGIN
   Label21.Caption := 'Der Zähler ist richtig!';
  END
  ELSE
   Label21.Caption := 'Denk nochmal gut nach, der Zähler ist noch nicht richtig!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
 TRY
  IF StrToInt(Edit4.Text) = StrToInt(Edit1.Text) THEN
  BEGIN
   Label22.Caption := 'Die Basis ist richtig!';
  END
  ELSE
   Label22.Caption := 'Denk nochmal gut nach, die Basis ist noch nicht richtig!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
 TRY
  Vergleich4 := Vergleich * -1;
  IF Vergleich4 = StrToInt(edit5.Text) THEN
  BEGIN
   Label23.Caption := 'Der Exponent ist richtig';
  END
  ELSE
   Label23.Caption := 'Denk nochmal gut nach, der Exponent ist noch nicht richtig!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
END;

PROCEDURE TForm1.Button11Click(Sender: TObject);
BEGIN
 Label21.Visible := True;
 Label22.Visible := True;
 Label23.Visible := False;
 TRY
  IF StrToInt(Edit3.Text) = 1 THEN
  BEGIN
   Label21.Caption := 'Der Zähler ist richtig!';
  END
  ELSE
   Label21.Caption := 'Denk nochmal gut nach, der Zähler ist noch nicht richtig!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
 TRY
  IF StrToInt(Edit4.Text) = StrToInt(Edit1.Text) THEN
  BEGIN
   Label22.Caption := 'Die Basis ist richtig!';
  END
  ELSE
   Label22.Caption := 'Denk nochmal gut nach, die Basis ist noch nicht richtig!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
 TRY
  Vergleich5 := Vergleich * -1;
  IF Vergleich5 = StrToInt(edit5.Text) THEN
  BEGIN
   Label23.Caption := 'Der Exponent ist richtig';
  END
  ELSE
   Label23.Caption := 'Denk nochmal gut nach, der Exponent ist noch nicht richtig!';
 EXCEPT
  ShowMessage('Du musst eine Zahl eingeben');
 END;
END;


PROCEDURE TForm1.Hilfe1Click(Sender: TObject);
BEGIN
 Button1.Visible  := False;
 Button2.Visible  := False;
 Button3.Visible  := False;
 Button4.Visible  := False;
 Button5.Visible  := False;
 Button6.Visible  := False;
 Button7.Visible  := False;
 Button8.Visible  := False;
 Button10.Visible := False;
 Button11.Visible := False;
 Button12.Visible := False;
 Edit1.Visible    := False;
 Edit2.Visible    := False;
 Edit3.Visible    := False;
 Edit4.Visible    := False;
 Edit5.Visible    := False;
 Label1.Visible   := False;
 Label2.Visible   := False;
 Label3.Visible   := False;
 Label4.Visible   := False;
 Label5.Visible   := False;
 Label6.Visible   := False;
 Label7.Visible   := False;
 Label8.Visible   := False;
 Label9.Visible   := False;
 Label10.Visible  := False;
 Label11.Visible  := False;
 Label12.Visible  := False;
 Label13.Visible  := False;
 Label14.Visible  := False;
 Label15.Visible  := False;
 Label16.Visible  := False;
 Label17.Visible  := False;
 Label18.Visible  := False;
 Label19.Visible  := False;
 Label20.Visible  := False;

END;

END.


was ich mich frag, wo tritt denn dein fehler auf?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 12.11.06 11:49 
user profile iconLeuchtturm hat folgendes geschrieben:
Was macht eigentlich das begin über procedure TForm1.Create :?:

Gute Frage, im vorigen Post war das noch nicht da, genau wie die Memo1.Text Zeile. :shock: :roll:
Deshalb ist mir das auch nicht aufgefallen, das gehört da jedenfalls ganz bestimmt nicht hin...
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 12.11.06 11:52 
user profile iconGrenzgaenger hat folgendes geschrieben:
so sieht dein code doch schon viel netter aus....

Ehrlich gesagt stört mich die ständige Großschreibung von IF, THEN und so mehr als die fehlende Einrückung! Das kenne ich höchstens aus uralten Pascal-Listings, aber in Delphi... Nee...
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: So 12.11.06 11:52 

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Rissstau Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 49



BeitragVerfasst: So 12.11.06 11:57 
Jo, die Lösung hab ich gerade bekommen...

THX an alle!!!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 12.11.06 11:57 
user profile iconRissstau hat folgendes geschrieben:
Ich möchte gerne in ein Programm einen längeren Text einbauen... Da es mir aber nicht gelingt, dies mit einem Memo zu machen (hab gestern schon gefragt), suche ich jetzt eine andere Lösung...

Seufz, jetzt weiß ich auch was er gemacht hat!!!!
Er hat geschrieben:
ausblenden Delphi-Quelltext
1:
2:
Memo1.Text := 'Hallo
Das ist ein Test'
;

Mehrzeilig eben! Aber das geht eben nur so:
ausblenden Delphi-Quelltext
1:
2:
Memo1.Text := 'Hallo' + #10#13
  + 'Das ist ein Test';

Aber woher sollen wir das wissen??? Du musst schon genau deinen Code schreiben!!!! :evil: :evil: :evil:
Man, man, das ist mir auch noch nicht vorgekommen... :roll: :roll:


Zuletzt bearbeitet von jaenicke am So 12.11.06 12:00, insgesamt 1-mal bearbeitet
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: So 12.11.06 12:00 
Daruaf kann man wirklich nicht kommen

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
Rissstau Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 49



BeitragVerfasst: So 12.11.06 18:09 
Ok, jetzt funktionierts!!! DANKE
BerTeL
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 45

Windowx XP
Delphi 7 Enterprise
BeitragVerfasst: So 12.11.06 18:24 
dann hänge den quelltext an ... als rar