Ma prosto je to da se uradi.. samo treba malo razmisljat i kako napravit neko pakovanje fajlova... evo ti primjer kako "instalirat" par slika na komp.. u attachu imas .exe!
Form1:
Code:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Button1: TButton;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.Close;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Form2.ShowModal;
end;
end.
Form2:
Code:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Gauges;
type
TForm2 = class(TForm)
Gauge1: TGauge;
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm2.FormActivate(Sender: TObject);
var B:TBitmap;
x:integer;
begin
Gauge1.MinValue:=0;
Gauge1.MaxValue:=100;
B:=TBitmap.Create;
B.LoadFromResourceID(HINSTANCE,1);
B.SaveToFile('c:\slika1.bmp');
for x:=1 to 34 do Gauge1.Progress:=Gauge1.Progress+1;
B.Free;
B:=TBitmap.Create;
B.LoadFromResourceID(HINSTANCE,2);
B.SaveToFile('c:\slika2.bmp');
for x:=1 to 33 do Gauge1.Progress:=Gauge1.Progress+1;
B.Free;
B:=TBitmap.Create;
B.LoadFromResourceID(HINSTANCE,3);
B.SaveToFile('c:\slika3.bmp');
for x:=1 to 33 do Gauge1.Progress:=Gauge1.Progress+1;
B.Free;
if IDOK=MessageBox(0,'Uspjesno ste instalirali 3 slike!','Instalacija dovrsena!',MB_OK)
then begin
Form1.Close;
Form2.Close;
end;
end;
end.
To je nesto najprostije sto moze da bude!
poz
edit:
fajl ne stane u attach pa ti ga evo ovdje:
http://d.turboupload.com/d/880402/instalacija.exe.html