源码:
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设为空也没有用。
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18