Jeżeli będzie mi się chciało to zrobie dynamiczne tworzenie kompnentów.
Kod:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, XPMan, ShellApi;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Label1: TLabel;
XPManifest1: TXPManifest;
Label2: TLabel;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
Application.Terminate;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Handle,nil,'film.avi',nil,nil,SW_SHOWNORMAL);
Application.Terminate;
end;
end.
Na forme wrzucić dwa buttony, komponent XPmanifest i etykiete.
@Ice zaraz doprobie wybieranie tekstu i nazwy pliku z pliku tekstowego.