Autor Beitrag
Coperator
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Di 31.05.05 15:03 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
 
 procedure TForm1.Button1Click(Sender: TObject);  
begin  
  Application.MessageBox('Ich Bin der Text !!!','Ich Bin der Titel !!!',0); // Null bedeutet OK Button  
end;


Ist es möglich hier einen Code mit einzubinden mit dem ich ein Bild von der Größe 32 x 32 (Pixel) einfügen kann? Wenn ja, wie und wohin? :D

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 31.05.05 15:15 
Du kannst meines Wissens kein eigenes Bild nehmen. Falls du aber die Windows-Standart-Symbole (rotes X, gelbes Achtung-Schild, ?-Sprechblase, i-Sprechblase) verwenden willst, dann kannst du hinten einfach mal statt der 0 folgende Zahlen ausprobieren:
16 :arrow: Critical Message
32 :arrow: Warning Query
48 :arrow: Warning Message
64 :arrow: Information Message

;)
Coperator Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Di 31.05.05 15:20 
THX... aber soweit war ich auch schon. Ich hab mir das mit den Bildern hierbei von mIRC abgeguckt. Im mIRC einfach auf "Help" > "About IRC..." . Dort sind auch zwei Bildchen. Einmal das Standard Icon und einmal das Bild von so nem TypY (der Programmierer davon oder so :nixweiss: )

Falls das aber hier nicht funzen sollte werde ich das wohl einsehen müssen :(
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 31.05.05 15:25 
Also mir fällt dazu nix ein. :nixweiss: Wirst du halt selber ein Formular erstellen müssen mit deinem Bild als TImage drin. ;)
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 31.05.05 15:40 
in der Suche im MSDN "MESSAGEBOXEX" kann man eigene Icons verwenden.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 31.05.05 15:44 
user profile iconMathiasSimmack hat folgendes geschrieben:
in der Suche im MSDN "MESSAGEBOXEX" kann man eigene Icons verwenden.

Ist ja cooooool. Muss ich gleich mal ausprobieren. ;)
Coperator Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20



BeitragVerfasst: Di 31.05.05 22:42 
Supergenial... Würde es gehen den Code hier reinzuschreiben da ich, wie schon gesagt, der absolute Nap im Umgang mit dieser Sprache bin.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 31.05.05 23:19 
MessageboxIndirect:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure MyMessageBox(hWnd: HWND; caption, Text: String; IDIcon: DWORD);
var
  MsgInfo: TMsgBoxParams;
begin
  MsgInfo.cbSize := SizeOf(TMsgBoxParams);
  MsgInfo.hwndOwner := hWnd;
  MsgInfo.hInstance := GetWindowLong(hWnd, GWL_HINSTANCE);
  MsgInfo.lpszText :=  @Text[1];
  MsgInfo.lpszCaption := @Caption[1];
  MsgInfo.dwStyle := MB_USERICON;
  MsgInfo.lpszIcon := MAKEINTRESOURCE(IDICON);
  MessageBoxIndirect(MsgInfo);
end;


Mit der MessageboxEx kann man aber auch nur die standard Icons darstellen.
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 01.06.05 08:45 
Wieso schreibe ich "MessageBoxEx"? :autsch: Ich meine doch Suche im MSDN "MESSAGEBOXINDIRECT", so wie Luckie das gezeigt hat. :oops: Sorry für evtl. Missverständnisse.