unit uRDP;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, MSTSCLib_TLB, StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
MsRdpClient: TMsRdpClient;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
MsRdpClient := TMsRdpClient.Create(Self);
with MsRdpClient
do
begin
Name := '
MsRdpClient';
Parent := Self;
Left := 0;
Top := 0;
Width := 800;
Height := 600;
TabOrder := 0;
ControlData :=
{0003000008000200000000000B000000030000000000};
// Dies kennt er nicht
end;
Edit1.BringToFront;
Button1.BringToFront;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
MsRdpClient.Server := Edit1.Text;
MsRdpClient.Domain := GetEnvironmentVariable('
USERDNSDOMAIN');
MsRdpClient.UserName := '
<username>';
MsRdpClient.AdvancedSettings2.ClearTextPassword := '
<password>';
MsRdpClient.Connect;
end;
end.