AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language Delphi Programm nur einmal starten bei "send to tray"
Thema durchsuchen
Ansicht
Themen-Optionen

Programm nur einmal starten bei "send to tray"

Ein Thema von mobed · begonnen am 7. Sep 2007 · letzter Beitrag vom 8. Sep 2007
 
mobed

Registriert seit: 3. Jun 2007
11 Beiträge
 
Delphi 7 Personal
 
#5

Re: Programm nur einmal starten bei "send to tray"

  Alt 8. Sep 2007, 09:34
Hi,

danke für die schnelle Hilfe.

Ich habe den Code wie folgt in den Projektcode eingefügt:
Delphi-Quellcode:
program dummy4butler;

uses
  Forms,
  butler_dummy in 'butler_dummy.pas{Form1};
  windows;

{$R *.res}
var
  dwMutex : DWORD;

begin
  dwMutex := CreateMutex(nil,true,'{1E43985D-925A-4733-B556-1BF25A069E3C}');
  try
    if ((dwMutex <> 0) and (GetLastError = ERROR_ALREADY_EXISTS)) then exit;
      Application.Initialize;
      Application.CreateForm(TForm1, Form1);
      Application.Run;
      end;
  finally
    if dwMutex <> 0 then CloseHandle(dwMutex);
  end;
end.
Dann bekomme ich Fehlermeldungen vom Compiler:
z.B. (die ersten beiden)
[Error] dummy4butler.dpr(6): Declaration expected but identifier 'windows' found
[Error] dummy4butler.dpr(10): Undeclared identifier: 'DWORD'

usw.

Habe ich es an der falschen Stelle eingefügt?

Mfg
mobed
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:05 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz