Thema: Delphi Programm ohne Form

Einzelnen Beitrag anzeigen

Noobinator

Registriert seit: 9. Mai 2006
147 Beiträge
 
Delphi 7 Personal
 
#12

Re: Programm ohne Form

  Alt 4. Feb 2008, 21:24
mal ne ganz dumme Variante:

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
form1.BorderStyle := bsnone;
form1.Color := clblack;
form1.TransparentColor := true;
form1.TransparentColorValue := clblack;
while true do
  begin
     windows.Beep(2000,100);
     sleep(500);
     application.ProcessMessages;
  end;
end;
Edit: mal mit Abbruchbedingung:

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
var terminate:boolean;
begin
terminate := false;

form1.BorderStyle := bsnone;
form1.Color := clblack;
form1.TransparentColor := true;
form1.TransparentColorValue := clblack;
while not terminate do
  begin
     windows.Beep(2000,100);
     sleep(500);
     application.ProcessMessages;
     if mouse.CursorPos.X = 0 then
     begin
        terminate := true;
        application.Terminate;
     end;
  end;
end;
  Mit Zitat antworten Zitat