so hab mich jetz tatsächlich ma drangesetzt und folgende version versucht bei mir beim ziehen auf die form keinerlei probleme irgendeiner art
Delphi-Quellcode:
unit TSClientSocket;
interface
uses ScktComp, Classes;
type TTSServer = (tsEuro, tsPacific, tsUS);
type TTSClientSocket =
class(TAbstractSocket)
private
FNick:
string;
FPassword:
string;
FSerial:
string;
FTSServer: TTSServer;
FOnPing: TNotifyEvent;
protected
procedure Event(Socket: TCustomWinSocket; ErrorEvent: TSocketEvent);
override;
procedure Error(Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
override;
procedure DoActivate(Value: Boolean);
override;
public
published
property Nick:
string read FNick
write FNick;
property Password:
string read FPassword
write FPassword;
property Serial:
string read FSerial
write FSerial;
property Server: TTSServer
read FTSServer
write FTSServer;
end;
procedure Register;
implementation
procedure TTSClientSocket.Event(Socket: TCustomWinSocket; ErrorEvent: TSocketEvent);
begin
case ErrorEvent
of
seConnect:
begin
with Socket
do
begin
SendText('
CVERS 11015 4608' + #13#10);
SendText('
PASS supersecret' + #13#10);
SendText('
NICK ' + FNick + #13#10);
SendText('
apgar ' + FPassword + #13#10);
SendText('
Serial ' + FSerial + #13#10);
SendText('
USER UserName HostName irc.westwood.com :RealName' + #13#10);
SendText('
VERCHK 32512 720911' + #13#10);
SendText('
SETOPT 16,32' + #13#10);
end;
end;
seRead:
begin
// später
end;
end;
end;
procedure TTSClientSocket.Error(Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
begin
//
end;
procedure TTSClientSocket.DoActivate(Value: Boolean);
begin
//
end;
procedure Register;
begin
RegisterComponents('
FooBar',[TTSClientSocket]);
end;
end.