类似网络蚂蚁的悬浮窗体

王朝delphi·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

源码:

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

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航