直接从TComponent继承的,包安装成功,但找不到组件,包属性是设计与运行时的
谁碰到过没?
谁碰到过没?
解决方案 »
- 装有Delphi7 的电脑里装了VS2005,结果 Delphi7 的 ADO 连接和断开 ORACLE9I 时都会报错
- 请问一下如何在delphi中使用sql语句,谢谢斑竹!
- 求助:有没有简洁的方法获取网页中的所有链接??
- 如何将DBGRID中的数据导出为excel文件呢
- 第一天用Delphi,感觉很好
- 也谈Delphi程序任务栏菜单的标准化
- 可数据窗口总是无法显示内容,请问高手,为什么????
- 用BDE连接Access2000时一定要先设置ODBC数据源吗? 怎么动态设置ODBC数据源?
- 在已经运行的DLL中如何得到运行它的EXE中的信息?
- 跪求 RemObjects_Everwood_D7.bpl
- 建路径中的各级文件夹
- RxRichEdit做类似QQ的聊天窗口,图文混排的消息中图片如何发送
begin
RegisterComponents('页名', [组件名]);
// RegisterComponents('Samples', [TMyControl]);
end;
RegisterComponents('Internet', [TMyClient]);
begin
RegisterComponents('页面名', [组件名]);
// RegisterComponents('Samples', [TMyControl]);
end;
begin
RegisterComponents('Internet', [TMyClientSocket]);
end;-------------
package MyClientSocket;{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DESCRIPTION 'MyClientSocket'}
{$IMPLICITBUILD OFF}requires
rtl;contains
uClientSocket in 'uClientSocket.pas',
uPublicFun in '..\public\uPublicFun.pas';end.
SysUtils, Classes,StdCtrls;type
TXdwButton = class(TButton)
private
FStr: string;
procedure SetStr(const Value: string);
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
property Str:string read FStr write SetStr;
end;procedure Register;implementationprocedure Register;
begin
RegisterComponents('Samples', [TXdwButton]);
end;{ TXdwButton }procedure TXdwButton.SetStr(const Value: string);
begin
FStr := Value;
end;end.
procedure Register;
begin
RegisterComponents('Internet', [TMyClientSocket]);
end;
写到'uClientSocket.pas'里面去吧!
SysUtils,
Classes,
uPublicFun,
uClientSocket;type
TSocketMsgEvent = procedure(Sender: TObject; const ASocketMsg: string) of object; TJcClientSocket = class(TComponent)
private
{ Private declarations }
FClientSocketThread: TClientSocketThread;
FOnSocketMsg: TSocketMsgEvent; function GetRemoteIp: string;
function GetRemotePort: Integer;
function GetHeartbeatMS: Cardinal;
function GetOnErrorNotify: TErrorNotifyEvent;
function GetOnInfoNotify: TInfoNotifyEvent; procedure SetRemoteIp(const Value: string);
procedure SetRemotePort(const Value: Integer);
procedure SetHeartbeatMS(const Value: Cardinal);
procedure SetOnSocketMsg(const Value: TSocketMsgEvent);
procedure SetOnErrorNotify(const Value: TErrorNotifyEvent);
procedure SetOnInfoNotify(const Value: TInfoNotifyEvent); procedure DealSocketMsg(lSocketMsg: string);
protected
{ Protected declarations }
procedure DoOnSocketMsg(const ASocketMsg: string);
public
{ Public declarations }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function MySendString(AData: AnsiString): Boolean;
published
{ Published declarations }
property RemoteIp: string read GetRemoteIp write SetRemoteIp;
property RemotePort: Integer read GetRemotePort write SetRemotePort default 5000;
property HeartbeatMS: Cardinal read GetHeartbeatMS write SetHeartbeatMS default 30000; property OnSocketMsg: TSocketMsgEvent read FOnSocketMsg write SetOnSocketMsg;
property OnErrorNotify: TErrorNotifyEvent read GetOnErrorNotify write SetOnErrorNotify;
property OnInfoNotify: TInfoNotifyEvent read GetOnInfoNotify write SetOnInfoNotify;
end;procedure Register;implementationprocedure Register;
begin
RegisterComponents('Internet', [TMyClientSocket]);
end;{ TMyClientSocket }
...uClientSocket.pas只是实现线程类TClientSocketThread的单元啊
要把Register放uClientSocket.pas?