4 Star 1 Fork 1

camark/SendManager

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.~pas 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
提子的碎碎念 提交于 2013-08-30 15:00 . 'init'
unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,Registry, Buttons,ShellApi;
type
TForm1 = class(TForm)
Label1: TLabel;
BitBtn1: TBitBtn;
Memo1: TMemo;
Label2: TLabel;
Label3: TLabel;
procedure FormCreate(Sender: TObject);
procedure Label2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure RegisterRight;
end;
var
Form1: TForm1;
implementation
uses IExeInf;
{$R *.dfm}
{ TForm1 }
procedure TForm1.RegisterRight;
const
REGKEY='Folder\Shell';
var
i:integer;
ie:IExeInterface;
reg:TRegistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CLASSES_ROOT;
for i := 0 to exeList.Count-1 do
begin
ie:=IExeInterface(exeList.items[i]);
if reg.OpenKey(REGKEY+'\'+ie.GetParam,true) then
begin
reg.WriteString('','SM -'+ie.GetDescription);
reg.CloseKey;
reg.OpenKey(REGKEY+'\'+ie.GetParam+'\command',true);
reg.WriteString('',Application.ExeName+' -'+ie.GetParam+' %1');
reg.CloseKey;
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterRight;
end;
procedure TForm1.Label2Click(Sender: TObject);
begin
ShellExecute(0,'open','mailto:[email protected]','','',SW_SHOW);
end;
end.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Delphi
1
https://gitee.com/camark/SendManager.git
[email protected]:camark/SendManager.git
camark
SendManager
SendManager
master

搜索帮助