|
毛玻璃?????????????
什么也不说了,我贴出来,很菜的……
高手肯定看不起,
源码如下:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,windows;
const
ModName = 'DWMAPI.DLL';
type
_MARGINS = record
cxLeftWidth: Integer; // width of left border that retains its size
cxRightWidth: Integer; // width of right border that retains its size
cyTopHeight: Integer; // height of top border that retains its size
cyBottomHeight: Integer; // height of bottom border that retains its size
end;
{$EXTERNALSYM _MARGINS}
MARGINS = _MARGINS;
{$EXTERNALSYM MARGINS}
PMARGINS = ^MARGINS;
{$EXTERNALSYM PMARGINS}
TMargins = MARGINS;
function DwmExtendFrameIntoClientArea(hWnd: HWND; const pMarInset: TMargins): HResult; stdcall; external ModName; //透明
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
var
mg: TMargins;
begin
mg.cxLeftWidth := -1;
mg.cxRightWidth := -1;
mg.cyTopHeight := -1;
mg.cyBottomHeight := -1;
Self.Color := clBlack; //默认黑色为透明
try
if DwmExtendFrameIntoClientArea(Self.Handle, mg) = 0 then
begin
end else
begin
showmessage('没有透明');
end;
except
end;
end;
end.
搞定,收工……
只要复制粘贴就行了,在win7上试试吧……
有源码也不和demo了吧,
如果你真要个demo 可以加群 164974340 找大悟还俗要……
好了,好了,下次来个别的,已经有计划了……
以下为图
我就在这,一起来学习学习吧
好像很多人喜欢背后有美女,我来发一张吧
要学习Ubuntu上的 Lazarus 了
大悟还俗 制作…… key_ok@qq.com |
评分
-
查看全部评分
|