Autor Beitrag
GuaAck
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 378
Erhaltene Danke: 32

Windows 8.1
Delphi 10.4 Comm. Edition
BeitragVerfasst: So 19.09.10 00:08 
Hallo,

ich mache ein Programm, das über den Windows-Autostart gestartet wird, im Hintergrund läuft und in der Iconbar als Symbol angezeigt wird, da wo die Uhrzeit angezeigt wird. Geht auch alles, aber ich bekomme nach dem Programmstart immer das Mainform, das ich dann erst per Mausclick schließen (ONCLOSE: hide und CaNone, mehr steht da nicht drin) muss, damit der Bildschirm wieder frei ist. Das Icon ist da, und dann geht auch alles. Habe schon mit Application.processMessages an verschiedenen Stellen probiert, ohne Erfolg.

Gleiches Verhalten ergibt sich, wenn ich das Programm in der IDE ausführe. Ein Haltepunkt auf ONCLOSE gesetzt zeigt, dass sofort nach Craete die ONCLOSE-Routine aufgerufenb wird.

Hat jemand eine Idee?

Viele Grüße aus Hamburg
Guenther


Zitat:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
PROCEDURE TForm1.FormCreate(Sender: TObject);
BEGIN
  TaskbarAddIcon;
  soll_close := false;
  close;

END;

PROCEDURE TForm1.FormClose(Sender: TObject; VAR Action: TCloseAction);
BEGIN
  IF soll_close THEN
    Action := cafree
  ELSE
    BEGIN
      Timer1.Enabled := true;
      Action := canone;
      Label1.visible := false;
      hide;
    END;
END;
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 19.09.10 00:18 
Projektoptionen -> Formulare -> Hauptformular anzeigen ODER Application.DhowMainform := false;

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
GuaAck Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 378
Erhaltene Danke: 32

Windows 8.1
Delphi 10.4 Comm. Edition
BeitragVerfasst: So 19.09.10 10:02 
:D Danke, das wars!!
Gruß Guenther