API

//任务栏上不出现按钮
SetWindowLong(Application.Handle, GWL_STYLE, WS_EX_TOOLWINDOW);

//任务栏上不出现按钮,通过改变最小化后窗体的位置来实现
var
tPlacement: WINDOWPLACEMENT;
begin
SetWindowLong(Application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
GetWindowPlacement(Application.Handle, @tPlacement);
tPlacement.flags := WPF_SETMINPOSITION;
tPlacement.ptMinPosition.X := Screen.Width + 100;
tPlacement.ptMinPosition.Y := Screen.Height + 100;
SetWindowPlacement(Application.Handle, @tPlacement);
end;

//显示一个最大化窗体。
ShowWindow(Self.Handle, SW_SHOWMAXIMIZED);

posted on 2014-09-17 00:47  云之灵  阅读(152)  评论(0编辑  收藏  举报