📄 164.htm
字号:
<!-- saved from url=(0022)http://internet.e-mail -->
<html>
<head>
<title>创建透明窗体 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc.css">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="195434" alink="195434">
<table width="621" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="621"><a href="http://www.CoDelphi.com"><img src="images/logo.gif" border="0" width="153" height="60"><img src="images/bigbanner.gif" border="0" width="468" height="60"></a></td>
</tr>
</table><br>
<br>
<table width="621" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="left" valign="top" class="font9" height="155">
<div align="center" class="btitle">创建透明窗体 <br>
<br>
</div>
<div align="center"><strong>CoDelphi.com </strong></div>
<b><br>
摘 要</b>:窗体 透明 <br>
<b> 关键字</b>:如何创建透明窗体 <br>
<b> 类 别</b>:图形
<hr size="1" width="100%">
<span class="content">{ 在窗体中添加 button,然后加入以下代码:} <br><br>procedure TForm1.FormCreate(Sender: TObject); <br>var <br>  FullRgn, ClientRgn, ButtonRgn: THandle; <br>  Margin, X, Y: Integer; <br>begin <br>  Margin := (Width - ClientWidth) div 2; <br>  FullRgn := CreateRectRgn(0, 0, Width, Height); <br>  X := Margin; <br>  Y := Height - ClientHeight - Margin; <br>  ClientRgn := CreateRectRgn(X, Y, X + ClientWidth, Y + ClientHeight); <br>  CombineRgn(FullRgn, FullRgn, ClientRgn, RGN_DIFF); <br>  X := X + Button1.Left; <br>  Y := Y + Button1.Top; <br>  ButtonRgn := CreateRectRgn(X, Y, X + Button1.Width, Y + Button1.Height); <br>  CombineRgn(FullRgn, FullRgn, ButtonRgn, RGN_OR); <br>  SetWindowRgn(Handle, FullRgn, True); <br>end;<br></span>
<table border="0" cellspacing="0" cellpadding="1" class="font9" align="center" width="100%">
<tr align="left" valign="middle" bgcolor="195434">
<td height="1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#C9C9C6" height="2"></td>
</tr>
</table>
<div align="center"><br>
中文开发在线<a href="http://www.codelphi.com" target="_blank">www.codelphi.com</a>授权使用。
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -