S
sy0116
Unregistered / Unconfirmed
GUEST, unregistred user!
我想让我的程序在Vista下实现整个界面都半透明的效果,在网上找到这篇文章:<br>http://www.cnblogs.com/dflying/archive/2007/03/20/680921.html<br>参照其中的代码写了下面的代码,但是却无法实现毛玻璃效果,整个窗口都变成白色的了,请问有谁做过类似的程序啊(D7、D2007都一样)<br>function EnableBlurBehindWindow(window:HWND;<br> enable:bool = true;<br> region:HRGN = 0;<br> transitionOnMaximized:bool = false):hresult;<br>var<br>blurBehindWM_BLURBEHIND;<br>begin<br> blurBehind.dwFlags:= DWM_BB_ENABLE + DWM_BB_TRANSITIONONMAXIMIZED;<br> blurBehind.fEnable:= enable;<br> blurBehind.fTransitionOnMaximized := transitionOnMaximized;<br> if (enable and (0 <> region)) then<br> begin<br> blurBehind.dwFlags := blurBehind.dwFlags+DWM_BB_BLURREGION;<br> blurBehind.hRgnBlur := region;<br> end;<br> result:=DwmEnableBlurBehindWindow(window,blurBehind);<br>end;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> EnableBlurBehindWindow(form1.Handle);<br>end;