在DelphiXe中,我通過項目主人創建了控制面板的新小程序,我更改了圖標,名稱等。 爲了激活反應,我編寫了Showmessage('Test');編譯,接收dll,在* .cpl中重命名。在這個文件開始的win.explorer中出現消息。 在WinXp中,我在c:\ windows \ system32中插入這個文件,打開控制面板的Windows,我看到小程序,並在其開始處顯示測試消息。 我在Win7x64(或2008r2)上做的太多了,但是在applet的控制面板中我沒有注意到,重新啓動一個問題並沒有解決。 試圖複製c:\ windows \ syswow64中的文件,也沒有結果。 如何強制applet出現在Win7下面板?控制面板Win7小程序
代碼:
library Project1;
uses
CtlPanel,
AppletModule1 in 'AppletModule1.pas' {AppletModule1AppletModule: TAppletModule};
exports CPlApplet;
{$R *.RES}
{$E cpl}
begin
Application.Initialize;
Application.CreateForm(TAppletModule1AppletModule, AppletModule1AppletModule);
Application.Run;
end.
////////////// and Unit module
unit AppletModule1;
interface
uses
Windows, Messages, SysUtils, Classes, CtlPanel, Dialogs;
type
TAppletModule1AppletModule = class(TAppletModule)
procedure AppletModuleActivate(Sender: TObject; Data: Integer);
private
{ private declarations }
protected
{ protected declarations }
public
{ public declarations }
end;
var
AppletModule1AppletModule: TAppletModule1AppletModule;
implementation
{$R *.DFM}
procedure TAppletModule1AppletModule.AppletModuleActivate(Sender: TObject;
Data: Integer);
begin
Showmessage('Test');
end;
end.
顧,你錯過了幾個步驟(關於註冊)。嘗試閱讀MSDN文檔http://msdn.microsoft.com/en-us/library/bb757044.aspx – RRUZ 2011-05-10 17:18:01
謝謝!不知道,現在小程序也註冊需求。會標記你的評論質量的答案,但我不知道它在這裏做。 – 2011-05-11 10:48:49