(Gast)
n/a Beiträge
|
AW: Dynamischer Verweis auf Komponente
17. Sep 2018, 11:24
Nun ja, einfach so:
Delphi-Quellcode:
unit uStartFrame;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TFrame1 = class(TFrame)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
implementation
uses
Winapi.ShellAPI;
{$R *.dfm}
procedure TFrame1.Button1Click(Sender: TObject);
begin
ShellExecute( Handle, ' open', PChar(Edit1.Text), PChar(Edit2.Text), nil, SW_SHOW );
end;
end.
und in der Form dann
Delphi-Quellcode:
unit uMainForm;
interface
uses
Winapi.Windows, Winapi.Messages,
System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
uStartFrame;
type
TForm1 = class( TForm )
Frame11: TFrame1;
Frame12: TFrame1;
Frame13: TFrame1;
Frame14: TFrame1;
Frame15: TFrame1;
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.
|
|
Zitat
|