procedure TForm1.ApplicationEvents1Minimize(Sender: TObject);
begin
showmessage('ok');
end;procedure TForm1.FormCreate(Sender: TObject);
begin
application.OnMinimize:=ApplicationEvents1Minimize;
end;end.以上代码不行啊??
最小化后并没有弹出 'ok', 当最小化到任务栏时,我用书标点击才发生??
begin
showmessage('ok');
end;procedure TForm1.FormCreate(Sender: TObject);
begin
application.OnMinimize:=ApplicationEvents1Minimize;
end;end.以上代码不行啊??
最小化后并没有弹出 'ok', 当最小化到任务栏时,我用书标点击才发生??
begin
Case Msg.CmdType of
SC_MINIMIZE: xxx;//你要的操作..
end;
end;
procedure Tfrmmain.ApplicationEvents1Minimize();
begin
showmessage('ok');
end;
procedure TFrmMain.WMSysCommand;
begin
Case Msg.CmdType of
SC_MINIMIZE: ApplicationEvents1Minimize();
end;
end;
procedure Tfrmmain.ApplicationEvents1Minimize();
begin
showmessage('ok');
end;
procedure TFrmMain.WMSysCommand;
begin
Case Msg.CmdType of
SC_MINIMIZE: ApplicationEvents1Minimize();
inherited;////********************不能忘;否则不会执行期望的操作
end;
end;
begin
showmessage('ok');
end;
procedure TFrmMain.WMSysCommand;
begin
Inherited;
Case Msg.CmdType of
SC_MINIMIZE: ApplicationEvents1Minimize();
end;
end;
bw1996(bw) 兄:为什么要放在前面呢?
一个是做完再发给WINPROC..
一个是做完WINPROC再做啊..