类似网络蚂蚁的悬浮窗体

文章作者 100test 发表时间 2007:09:06 12:48:05
来源 100Test.Com百考试题网


  源码:

  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设为空也没有用。


相关文章


个性凸现的动画特技效果
关于文件复制的程序代码
关于捕获VCL没有处理的Windows消息
用C Builder写COM版的Helloworld
类似网络蚂蚁的悬浮窗体
三层架构各层间的访问过程
用C 制作具有HTML风格的动态按钮
数字小键盘指法练习
合理布线必须仰仗的六条定律
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛