(Gast)
n/a Beiträge
|
Re: Funktion erstellen
19. Jul 2004, 20:48
Habs geschafft:
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
procedure createautorunfile(app : String; icon : String; destfile : String);
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
createautorunfile(' Test.exe',' test.ico',' C:\test');
end;
procedure TForm1.createautorunfile(app : String; icon : String; destfile : String);
var
sl : TStringList;
begin
sl:=TStringList.create;
sl.add(' [autorun]');
sl.add(' OPEN=' + app);
sl.add(' ICON=' + icon);
sl.SaveToFile(destfile+' .inf');
ShowMessage(' Finished!');
end;
end.
Meint ihr meine kleine Procedure soll in die CodeLib. Net wirklich, oder?
|
|
|