Autor Beitrag
bfelix
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 61

WIN 2000 Prof., Win XP Prof., Win 7 Starter und Prof., SuSe Linux 11.3,
Delphi 7 Pers.
BeitragVerfasst: Mi 16.02.11 21:34 
Hallo Community,
wenn ich Aufrufe:
ausblenden Delphi-Quelltext
1:
ShowMessage('Hallo');					

dann gibt das ja eine einfache Meldung mit Projekt-Titel als Titel und einem einfachen OK-Knopf. Wie kann ich eine Meldung individuell ausgeben, also z.B. mit 'Hallo' als Titel und dann OK und Abbrechen?

Danke
BFelix
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Mi 16.02.11 21:35 

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
bfelix Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 61

WIN 2000 Prof., Win XP Prof., Win 7 Starter und Prof., SuSe Linux 11.3,
Delphi 7 Pers.
BeitragVerfasst: Mi 16.02.11 21:45 
Bei mir zeigt es bei
ausblenden Delphi-Quelltext
1:
MessageDlg('Es müssen mindestens 2 Spieler eingetragen werden!',mtError, mbOK, 0);					

folgende Compilermeldung an:
Zitat:
Inkompatible Typen: 'TMsgTldButtons' und 'TMsgTldBtn'


Was könnte da das Problem sein?
Stundenplan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128
Erhaltene Danke: 32

Win 7
Delphi 7 Pers., C# (VS 2010 Express)
BeitragVerfasst: Mi 16.02.11 21:54 
Es muss auch MessageDlg('Es müssen mindestens 2 Spieler eingetragen werden!',mtError, [mbOK], 0); heißen, weil ein Set übergeben werden muss.

Viele Grüße,
Stundenplan.
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: Mi 16.02.11 21:56 
user profile iconbfelix hat folgendes geschrieben Zum zitierten Posting springen:
Was könnte da das Problem sein?
Dass die Funktion eine Liste von Buttons erwartet und du einen einzelnen angibst... siehst du ja in dem verlinkten Beispiel auch...
ausblenden Delphi-Quelltext
1:
MessageDlg('Es müssen mindestens 2 Spieler eingetragen werden!',mtError, [mbOK], 0);					
gnomecoder
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51
Erhaltene Danke: 5



BeitragVerfasst: Do 17.02.11 00:10 
bei manchen projekten erstell ich mir ne ganz eigene Form als messagebox die ich dann ganz nach meinen wünschen gestalte.
nur als tipp ;)
Frühlingsrolle
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 17.02.11 00:26 
- Nachträglich durch die Entwickler-Ecke gelöscht -
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: Do 17.02.11 00:28 
Das Basteln einer komplett eigenen Form kann man sich oft auch sparen. Man kann einen Dialog mit CreateMessageDialog erzeugen lassen und den dann einfach noch verändern. Dann zeigt man das Formular an und gibt es am Ende frei, das ist alles. Das spart oft viel Mühe. ;-)