Autor Beitrag
cuejo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 142

Win XP
Delphi 7 Personal und 2005 PE
BeitragVerfasst: Mi 07.06.06 21:33 
Hi
Ich versuche folgende Message zu verwenden:
ausblenden Delphi-Quelltext
1:
2:
3:
if MessageDlg('Welcome to my Delphi application.  Exit now?',
   mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes then
...

Wie ihr vielleicht bemerkt habt handelt es sich dabei um ein Beispiel aus der Delphi-Hilfe. Um so verwunderlicher ist es das es nicht funktionierne will :shock: ! Schließlich habe ich's nur kopiert :?!?: ...
Der Debugger sagt mir ich verwende zu viele Parameta. Ich habe festgestellt, dass das am letzten liegt. Warum ist das so? Das sind die Units die ich verwende:
ausblenden Delphi-Quelltext
1:
2:
uses
  Windows, Dialogs, SysUtils, Classes, Types, Graphics;

Fehlt da etwa irgentwas? Ich weiß wirklich nicht mehr weiter... :cry:

_________________
Computer sind dumm, aber fleißig. Deshalb arbeite ich so gerne damit.


Zuletzt bearbeitet von cuejo am Mi 07.06.06 23:14, insgesamt 2-mal bearbeitet
Arno Nym
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131



BeitragVerfasst: Mi 07.06.06 21:57 
Hi,
das ist zwar keine Message, aber ich geb dir trotzdem n Tip...wenn der letzte Parameter stört...dann lass ihn doch einfach wech..dann klappts doch.
MFG, Arno Nym
cuejo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 142

Win XP
Delphi 7 Personal und 2005 PE
BeitragVerfasst: Mi 07.06.06 22:02 
user profile iconArno Nym hat folgendes geschrieben:

...dann lass ihn doch einfach wech..dann klappts doch.

Nee, leider nicht. Dann kommt die Fehlermeldung Undefinierter Bezeichner: 'mrYes'...



user profile iconArno Nym hat folgendes geschrieben:

das ist zwar keine Message, aber ich geb dir trotzdem n Tip...

Ich bin nicht so bewandert in diesen Dingen. :oops: Wie nennt man das denn?

_________________
Computer sind dumm, aber fleißig. Deshalb arbeite ich so gerne damit.
Arno Nym
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131



BeitragVerfasst: Mi 07.06.06 22:27 
Hi!
Also wenn ich den Parameter weglasse dann klappts
ausblenden Delphi-Quelltext
1:
2:
if MessageDlg('Welcome to my Delphi application.  Exit now?',
   mtConfirmation, [mbYes, mbNo], 0) = mrYes then ... ;


...und wir nennen es einen Dialog, einen DIALOG... (Zitat Herr der Ringe)

MFG, Arno Nym
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 07.06.06 22:32 
Moin!

Bei mir funktioniert dieser Code ganz hervorragend:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if MessageDlg('Test',mtConfirmation,[mbYes,mbNo],0) = mrYes then
  ShowMessage('mrYes')
else
  ShowMessage('mrNo');

cu
Narses

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

Win XP
Delphi 7 Personal und 2005 PE
BeitragVerfasst: Mi 07.06.06 22:58 
Das gibt bei mir den gleichen Fehler! :motz:

_________________
Computer sind dumm, aber fleißig. Deshalb arbeite ich so gerne damit.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 07.06.06 23:03 
Moin!

Hast du die Unit Controls in der uses-Klausel?

cu
Narses

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

Win XP
Delphi 7 Personal und 2005 PE
BeitragVerfasst: Mi 07.06.06 23:07 
Jetzt schon! :zwinker: omg DANKE! :D Jetzt gehts! :dance2:

_________________
Computer sind dumm, aber fleißig. Deshalb arbeite ich so gerne damit.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 07.06.06 23:12 
Moin!

Danke, dass du den Titel nochmal aussagekräftig umbenannt hast. ;)

cu
Narses

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

Win XP
Delphi 7 Personal und 2005 PE
BeitragVerfasst: Mi 07.06.06 23:18 
Hab nichts dagegen. Aber ich selbst wäre nicht auf die Idee gekommen danach zu suchen. Das liegt aber wohl eher an meiner Unwissenheit :lol:

_________________
Computer sind dumm, aber fleißig. Deshalb arbeite ich so gerne damit.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 07.06.06 23:19 
Moin!

Wird zwar jetzt langsam OT, aber:

Du hast ein Problem mit MessageDlg und würdest nicht danach suchen... :gruebel: :mrgreen: :?:

cu
Narses

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

Win XP
Delphi 7 Personal und 2005 PE
BeitragVerfasst: Mi 07.06.06 23:21 
Ich meinte natürlich das mit ModalResult! :wink:

_________________
Computer sind dumm, aber fleißig. Deshalb arbeite ich so gerne damit.