如何产生不会按Win+M键而消失的小窗口,类似FLASHGET的悬浮窗,我重载了
procedure TLittlebox.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams( Params);
Params.WndParent:=0;
end;
设这个Form的边为NONE,
结果在任务栏中出现这个窗口的标题,如何才能达到象FLASHGET一样的窗口呢?
我已经知道答案了,从CSDN得知
procedure TLittlebox.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams( Params);
Params.ExStyle := Params.ExStyle or WS_EX_TOPMOST or WS_EX_TOOLWINDOW;
Params.WndParent := 0; // 这是必须的,否则当App变为后台时会将该窗体设置为不TopMost
end;
procedure TForm1 . FormCreate ( Sender : TObject );
begin
with Application do
SetWindowLong ( Handle , GWL_EXSTYLE , GetWindowLong ( Handle , GWL_EXSTYLE ) and
not WS_EX_APPWINDOW or WS_EX_TOOLWINDOW );
SetWindowPos ( Handle , HWND_TOPMOST , 0 , 0 , 0 , 0 , SWP_NOMOVE or SWP_NOSIZE );
end ;