利用Delphi编写Windows控制面板组件及实例
ex;
本文链接地址:http://www.oyaya.net/fanwen/view/141723.html
end;
RegSetValueEx(KeyHandle,'WinA', 0, REG_BINARY, @Option1, SizeOf(Option1));
RegSetValueEx(KeyHandle,'WinB', 0, REG_BINARY, @Option2, SizeOf(Option2));
end;
- TForm1.FormClose代码://关闭注册表
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
RegCloseKey(KeyHandle);
end;
④修改Project1代码如下:
library Project1;
uses
Cpl,
Windows,
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};
{$R *.RES}
procedure ExecuteApp;
{$E dll}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end;
procedure ExecuteApp2;
{$E dll}
begin
Application.Initialize;
Application.CreateForm(TForm2, Form2);
Application.Run;
end;
《利用Delphi编写Windows控制面板组件及实例(第4页)》