您现在的位置:首页 >> 界面报表 >> 界面报表 >> 内容

Delphi创建一个虚幻的层窗口(Win2000/XP)

时间:2011/9/3 15:24:55 点击:

  核心提示:procedure TForm1.FormCreate(Sender: TObject);var ExSty:DWORD;begin ExSty:=GetWindowLong(Handle,GWL_E...

procedure TForm1.FormCreate(Sender: TObject);
var
  ExSty:DWORD;
begin
  ExSty:=GetWindowLong(Handle,GWL_EXSTYLE);
  ExSty:=ExSty or WS_EX_TRANSPARENT or WS_EX_LAYERED;
  SetWindowLong(Handle,GWL_EXSTYLE,ExSty);
  SetLayeredWindowAttributes(Handle,cardinal(clBtnFace),125,LWA_ALPHA);
  MoveWindow(Handle,Screen.Width-Self.Width,0,Self.Width,Self.Height,false);
end;

试试,在Win2000\XP下有效果.

作者:网络 来源:转载
共有评论 1相关评论
发表我的评论
  • 大名:
  • 内容:
  • 盒子文章(www.2ccc.com) © 2024 版权所有 All Rights Reserved.
  • 沪ICP备05001939号