procedure TForm1.FormCreate(Sender: TObject);
beginCLOSE;end;end;
上面的CLOSE不能关闭窗体,为什么,TForm1。HIDE也不能隐藏窗体,,谢谢各们大哥了。。
beginCLOSE;end;end;
上面的CLOSE不能关闭窗体,为什么,TForm1。HIDE也不能隐藏窗体,,谢谢各们大哥了。。
解决方案 »
- 买的QQ号密保又被卖号的改回去了,想自己写一个批量修改QQ密保的小软件,有没有delphi的QQRSA加密原码啊。
- 请问一个从四五条生产线上的传感器上得到数据,然后在显示到监控屏幕的程序报价多少钱.
- 在ImageEn中如何打印tif文件?我想直接打印,而不是预览再打印----急啊
- delphi中十六进制的加减运算,尤其是减的运算
- 做过套打的兄弟进来看看!
- 帮我分隔一条too too too ..........long 的Update语句。。。。。(小的很很急需解决的!!!)
- 高手请进
- query filter
- 谁能介绍基本好的DELPHI书给我吗?
- 问在delphi中如何提取分隔符?
- delphi 如何获取IIS站点列表
- 如何指定某用户写入注册表?
oncreate事件是窗体创建时执行的
可以建一个按钮,在按钮的onclick事件中加入close来关闭窗体
begin
CLOSE;
end;
*)procedure TForm1.FormCreate(Sender: TObject);
begin
Application.ShowMainForm := False;
end;
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, AppEvnts;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
private
{ Private declarations }
public
{ Public declarations }
ID : integer;
procedure WMHotKeyHandle(var Msg: TWMHotKey); message WM_HotKey;
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
{ 注册 Ctrl + Alt + F9 组合热键 }
if FindAtom('LihuaSoftHotKey') = 0 then
begin
ID := GlobalAddAtom(PAnsiChar('LihuaSoftHotKey'))-$C000;
RegisterHotkey(Handle,ID,MOD_Control or mod_Alt,VK_F9);
end;
Application.ShowMainForm := False;
end;procedure TForm1.WMHotKeyHandle(var Msg: TWMHotKey);
begin
Msg.Result:=1;
if Msg.HotKey = ID then Application.MainForm.Show;
end;procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if ID <> 0 then begin
UnregisterHotKey(Handle,ID);
DeleteAtom(ID);
end;
end;end.
*)procedure TForm1.FormCreate(Sender: TObject);
begin
Application.ShowMainForm := False;
end;不是这是,是程序运行时.如果不是在我定义的目录运行的,就关闭程序,谢谢大家了
晕....那如果想关闭程序,直接Application.Terminate不就可以了?