Re: Help with delphi 2006 - WeOnlyDo Discussion board

Re: Help with delphi 2006 (General questions)

by fifthelement, Monday, December 25, 2006, 06:47 (6543 days ago) @ FiFtHeLeMeNt

Finally I made it to work , but still I have problems with it.
events doesnt work , it seems that the component is not installed properly, because when I want to run my program I get the following error message :
wodtunnel1 doesnt have a corresponding component , remove declaration ?
the tunnel works now , but the events dont run. here is my code :

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,wodSSHTunnelLib_TLB, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
wodTunnel1:TwodTunnel;
procedure Label1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure wodTunnel1Connected(Sender: TObject);

private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
wodTunnel1:=Twodtunnel.Create(wodTunnel1);

wodTunnel1.Hostname := 'host';
wodTunnel1.Login := 'demo';
wodTunnel1.Password := 'demo';

wodTunnel1.Port := 22;
wodTunnel1.Authentication := authPassword;
wodTunnel1.Protocol := SSHAuto;

wodTunnel1.Connect;
end;

procedure TForm1.WodTunnel1Connected(Sender: TObject);
begin
label1.Caption:='connected';
end;


procedure TForm1.Label1Click(Sender: TObject);
begin
label1.Caption:='click';

end;

end.


Complete thread: