欢迎光临
我们一直在努力

类似网络蚂蚁的悬浮窗体_delphi教程

建站超值云服务器,限时71元/月

源码:


protected:
        virtual void __fastcall CreateParams(TCreateParams & Param);


void __fastcall TForm2::CreateParams(TCreateParams & Param)
{
  //调用基类
  TForm::CreateParams(Param);   


  //去掉窗口标题区
  Param.Style=Param.Style & ~WS_CAPTION;
  Param.Style=Param.Style | WS_POPUP;
  //设为总在最上面
  Param.ExStyle=Param.ExStyle | WS_EX_TOPMOST;
  //设Windows Owner为Desktop Window
  Param.WndParent=GetDesktopWindow();
}


注意:
  1、Windows Owner与Windows Parent不同,用::SetParent函数和设置Form?->Parent这能设置Windows Parent,不能设置Windows Owner,要实现FlashGet的悬浮窗必须要设置Windows Owner。
  2、Form的BorderStyle要设为bsToolWindow,不然在任务栏上会显示出这个窗口的标题,将Caption设为空也没有用。

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 类似网络蚂蚁的悬浮窗体_delphi教程
分享到: 更多 (0)

相关推荐

  • 暂无文章