C# WinForm实现Win7 Aero磨砂效果
来源:互联网 发布:广东网络商标侵权管辖 编辑:程序博客网 时间:2024/04/29 15:44
[StructLayout(LayoutKind.Sequential)]
public struct MARGINS{
public int Left;
public int Right;
public int Top;
public int Bottom;
}
[DllImport("dwmapi.dll", PreserveSig = false)]
static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref MARGINS margins);
[DllImport("dwmapi.dll", PreserveSig = false)]
static extern bool DwmIsCompositionEnabled(); //Dll 导入 DwmApi
protected override void OnLoad(EventArgs e)
{
//如果启用Aero
if (DwmIsCompositionEnabled())
{
MARGINS m = new MARGINS();
m.Right = -1; //设为负数,则全窗体透明
DwmExtendFrameIntoClientArea(this.Handle, ref m); //开启全窗体透明效果
}
base.OnLoad(e);
}
protected override void OnPaintBackground(PaintEventArgs e)
{
base.OnPaintBackground(e);
if (DwmIsCompositionEnabled())
{
e.Graphics.Clear(Color.Black); //将窗体用黑色填充(Dwm 会把黑色视为透明区域)
}
}
0 0
- C# WinForm实现Win7 Aero磨砂效果
- C# WinForm实现Win7 Aero磨砂效果
- winform下实现win7 Aero磨砂效果实现代码
- C# Winform 窗体美化(七、Win7 Aero 毛玻璃效果)
- C#实现具有Aero效果的窗体
- C#实现具有Aero效果的窗体
- C#实现具有Aero效果的窗体
- C# 窗体制作Aero效果
- 磨砂效果
- iOS磨砂(半透明)效果实现
- 关闭win7 透明化效果 aero
- [2013.9.6]说说Win7的Aero效果
- WinForm的TreeView实现Win7 Areo效果
- Winform TreeView 实现 Win7 Areo效果
- Delphi窗体GlassFrame实现在win7下的Aero Glass效果
- 在VirtualBox下安装win7实现aero效果的图文教程
- C#迅雷七窗体特效,使用DWM实现Aero Glass效果
- Aero效果
- HTTP协议中POST、GET、HEAD的区别是什么
- View.setTag(key,object)异常:The key must be an application-specific resource id.
- 隐马尔科夫模型HMM的前向算法和后向算法
- mysql 时间函数
- 在Spring下集成ActiveMQ
- C# WinForm实现Win7 Aero磨砂效果
- 视频播放
- 应用Druid监控SQL语句的执行情况
- mvaen打包错误
- 汇编控制指令
- “计算机视觉”阅读笔记
- leetcode338 Counting Bits
- 高效利用Angular中内置服务
- UIcolor,CGcolor,CIcolor之间的联系与区别