我的一个DPR 文件。没有界面,没有按钮,没有窗体,就这个DPR文件,我想问下怎么把他编译成exe 文件啊?
请详细说明刚接触delphi,不懂就问各位老大。
源码如下:program SetReg;uses
registry,
Windows,
Messages,
SysUtils,
Variants,
Classes,
Graphics,
Controls,
Forms,
Dialogs,
StdCtrls,
ExtCtrls;{$R *.res}
var
reg:tregistry;begin Reg:=Tregistry.Create;
reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKey('SoftWare\Tide',false) then
begin
Reg.WriteInteger('Enabled',0);
end;
Reg.CloseKey;
reg.Free;
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.Run;
end.
请详细说明刚接触delphi,不懂就问各位老大。
源码如下:program SetReg;uses
registry,
Windows,
Messages,
SysUtils,
Variants,
Classes,
Graphics,
Controls,
Forms,
Dialogs,
StdCtrls,
ExtCtrls;{$R *.res}
var
reg:tregistry;begin Reg:=Tregistry.Create;
reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKey('SoftWare\Tide',false) then
begin
Reg.WriteInteger('Enabled',0);
end;
Reg.CloseKey;
reg.Free;
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.Run;
end.
作了一个批处理文件comp.bat
dcc32 D:\Release\ERP\m1000\main.pas
dcc32 D:\Release\ERP\m1000\m1000.DPR
用winexec运行不生成exe
直接点击comp.bat生成exe为何啊
但小弟还是看不懂。
引用了太多没用的单元,后面放那几句Application对象什么用都没有
这不是WinForm程序,而是一个控制台程序,
把Application.MainFormOnTaskbar := True;删除试一试