Einzelnen Beitrag anzeigen

c20c

Registriert seit: 23. Mai 2009
Ort: Liederbach
9 Beiträge
 
Delphi 2009 Architect
 
#8

AW: Alles in einem: Service und Formularanwendung

  Alt 22. Jul 2010, 21:07
@ himitsu ok das wäre dann eine Option. Heißt aber nicht, dass es dann klappt.
Ich denke, ich werde nochmal genau Logfile führen wann das Programm wie gestartet wird.

@ Luckie

also, mit folgendem "Dummy-Code" funktioniert alles, dh. daran kann es nicht liegen:

Delphi-Quellcode:
program Project4;

uses
  SvcMgr,
  Unit1 in 'Unit1.pas{Service1: TService},
  Unit3 in 'Unit3.pas{Form3};

{$R *.RES}

begin

  if false then createnormalform
  else
    begin

    if not Application.DelayInitialize or Application.Installing then
      Application.Initialize;
    Application.CreateForm(TService1, Service1);
  Application.Run;
    end;
end.
Delphi-Quellcode:
unit Unit3;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm3 = class(TForm)
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

procedure createnormalform;

implementation

{$R *.dfm}

procedure createnormalform;
begin
Application.Initialize;
Application.CreateForm(TForm3,Form3);
Application.Run;
end;

end.
Kermit the Frog
NEIN .... 22 durch 11 ist NICHT 1

Geändert von c20c (22. Jul 2010 um 21:09 Uhr)
  Mit Zitat antworten Zitat