c# 如何制作Windows 7 aero winform(玻璃)?

发布于 2024-10-01 07:25:56 字数 131 浏览 0 评论 0原文

如何制作这样的东西

Windows 窗体玻璃效果,使 ImageBox 透明

我使用 VS 2010

how to make somthing like this

Windows Forms Glass Effect, Make ImageBox transparent

I use VS 2010

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

能否归途做我良人 2024-10-08 07:25:56

如果您正在寻找的是标准玻璃效果(包括模糊),请查看这篇文章:

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

基本上,您所做的就是将窗口的框架(已经具有玻璃效果)扩展到客户区域。您必须使用几个 P/invoke 方法来调用 Windows Vista 或更高版本附带的 DWM API,因为这不是内置于 .NET Framework 中的。

编辑:如果您正在寻找对模糊效果的更多控制,您可能会更具体地研究 DwmEnableBlurBehindWindow 来自 DWM API 的函数,尽管我自己没有使用过这个。

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.

初见终念 2024-10-08 07:25:56

看一下:

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

MARGINS 数组类似于 HTML 页面上的边距。 MSDN 上的第一个示例给出了窗口底部高度为 25 像素的玻璃效果的边距。

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.

帅气尐潴 2024-10-08 07:25:56

MS 教程相当容易理解并使用 C#。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文