Delphi DLL 中不能创建含ActiveX 的 Form,如何调用CoInitialize() 在你的conInitialize()Form1 := TForm1.Create(Application); Form1.show;UnInitialize;来注册消息队列!~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 UnInitialize;在对象被释放的时候进行,还有就是你的客户程序的线程模式! 如此搞定!///*********************************************************library Project2;uses SysUtils, Classes, Unit1 in 'Unit1.pas' {Form1};{$R *.res} exports applyskin, removeskin; beginend.////****************************************unit Unit1;interfaceuses Windows,Forms,ActiveX, Classes, Controls, OleCtrls, ACTIVESKINLib_TLB,ComObj, StdCtrls;type TForm1 = class(TForm) Skin1: TSkin; procedure WndProc(var Message: TMessage);override; private { Private declarations } public { Public declarations } end;var Form1: TForm1; function applyskin(hwnd:HWND;prjhandle:THandle):Integer; cdecl; function removeskin():Integer;cdecl;implementation{$R *.dfm} function applyskin(hwnd:HWND;prjhandle:THandle):Integer; begin CoInitialize(nil); //Application.Handle := prjhandle; Form1 := TForm1.Create(Application); Form1.Skin1.ApplySkinByName(hwnd,'FreeForm'); applyskin := 0; end; function removeskin():Integer; begin Form1.Free; CoUnInitialize(); removeskin := 0; end; procedure TForm1.WndProc(var Message: TMessage);override; begin end;end. Format问题 在一个有master data的报表中怎样从第一条记录到最后一条记录画一条竖线(不是左边框) 请问如何用Delphi清除IE的缓存? 如何清空一个只读文本框的内容,类似msn或者popo的聊天窗口 请教高手 我怎样判断输入的日期为合法 求教高手,数据库中text字段的值怎么用Table插入? 在线等待-100分 只问一个很菜的问题 ADO问题 有没有什么法子方便的对付这些调皮的控件 两种声明哪种好? 关于统计的问题
在对象被释放的时候进行,还有就是你的客户程序的线程模式!
library Project2;uses
SysUtils,
Classes,
Unit1 in 'Unit1.pas' {Form1};{$R *.res}
exports
applyskin,
removeskin;
begin
end.////****************************************
unit Unit1;interfaceuses
Windows,Forms,ActiveX, Classes, Controls, OleCtrls, ACTIVESKINLib_TLB,ComObj,
StdCtrls;type
TForm1 = class(TForm)
Skin1: TSkin;
procedure WndProc(var Message: TMessage);override; private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1; function applyskin(hwnd:HWND;prjhandle:THandle):Integer; cdecl;
function removeskin():Integer;cdecl;implementation{$R *.dfm} function applyskin(hwnd:HWND;prjhandle:THandle):Integer;
begin
CoInitialize(nil); //Application.Handle := prjhandle;
Form1 := TForm1.Create(Application);
Form1.Skin1.ApplySkinByName(hwnd,'FreeForm'); applyskin := 0;
end; function removeskin():Integer;
begin
Form1.Free;
CoUnInitialize();
removeskin := 0;
end; procedure TForm1.WndProc(var Message: TMessage);override;
begin end;
end.