c# how to make a Windows 7 aero winform (blured glass)?

痴心易碎 提交于 2019-11-28 09:30:16

问题


how to make somthing like this

Windows Forms Glass Effect, Make ImageBox transparent

I use VS 2010


回答1:


If all you are looking for is the standard glass effect (which includes the blur), check out this article:

http://www.codeproject.com/KB/vista/AeroGlassForms.aspx

Basically, all you're doing is extending the window's frame (which already has the glass effect) into the client area. You have to call the DWM API that come with Windows Vista or later using a couple of P/invoke methods because this is not built into the .NET Framework.

EDIT: If you're looking for more control over the blur effect, you might look into more specifically the DwmEnableBlurBehindWindow function from the DWM API, although I have not used this myself.




回答2:


Take a look at this:

http://msdn.microsoft.com/en-us/library/aa969512(VS.85).aspx

The MARGINS array is similar to margins on an HTML page. The first example on MSDN gives the margins for the glass effect 25 pixels in height on the bottom of the window.




回答3:


This MS tutorial is fairly easy to understand and uses C#.



来源:https://stackoverflow.com/questions/4096609/c-sharp-how-to-make-a-windows-7-aero-winform-blured-glass

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!