Autor Beitrag
Stevie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 85

Windows 7
Delphi XE Professional
BeitragVerfasst: Do 22.05.03 12:43 
Hi Leute,

ich hab in mein Chat-Programm eingebaut, dass ein MessageDlg angezeigt wird, wenn es minimiert ist, und eine neue Mitteilung kommt. Der Dialog erscheint, aber ich bekomme nix davon mit, wenn andere Fenster öffen sind, weil sie davor ist. Wie kann ich den Dialog in den Vordergrund bringen, aber mit der Möglichkeit, andere Fenster wieder davor zu tun?

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
if (IsIconic(Application.Handle)) then
begin
  if MessageDlg('Neue Nachricht! Wollen Sie sie lesen?',
  mtConfirmation, [mbYes, mbNo], 0) = mrYes then
  begin
    Application.Restore;
    ShowWindow(Application.Handle, SW_SHOW);
  end;
end;
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 22.05.03 13:12 
Vorher deine Anwendung in den Vordergrund holen. Sprich: aktiv machen.
Stevie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 85

Windows 7
Delphi XE Professional
BeitragVerfasst: Do 22.05.03 13:13 
Mit welchem Befehl mache ich das? Es soll aber nicht das Fenster angezeigt werden.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 22.05.03 13:38 
nimm statt messagedlg doch application.messagebox. das geht genauso aber bei der kannst du noch als Flag MB_SYSTEMMODAL angeben. die msg wird also auch angezeigt, wenn das form minimiert ist.

vielleicht gibts sowas auch fürn messageDlg. schau mal in die onlineHilfe

_________________
In the beginning was the word.
And the word was content-type: text/plain.