以前的代码不能用。貌似在Delphi2010后就开始不行了,搜索了一下,得到办法:
1 修改工程文件添加一句:Application.MainFormOnTaskbar := False;
2 在主窗体的 OnShow 事件中写下
var
Style: Integer;
begin
Style := GetWindowLong(Handle, GWL_EXSTYLE);
SetWindowLong(Handle, GWL_EXSTYLE, Style and (not WS_EX_APPWINDOW));
ShowWindow(Application.Handle, SW_HIDE);
end;
Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号
执行时间: 0.10569405555725 seconds