vb生成Vista风格窗口的控件,具有透明效果的VB窗体控件,想当漂亮的窗体风格,99%的Vista Aero窗体VB源码。失去焦点时窗体透明度降低 dec alpha when form lost focus 失去焦点时窗体阴影减弱 dec shadow when form lost focus 失去焦点时标题阴影透明度降低 dec title shadow then form lost focus 按钮光晕mouse_on时alpha渐变(不会多线程。。用了loop
本文实例讲述了C#编程实现带有Aero效果的窗体。分享给大家供大家参考,具体如下:
using System.Runtime.InteropServices;//引用,放在哪不用说了吧....
[DllImport(dwmapi.dll)]
public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS pMarinset);
[StructLayout(LayoutKind.Sequential)]
在Vista系统之后,微软为窗体程序提供了Aero磨砂的效果,如下图。那么用C#如何来实现这种磨砂效果呢?
背景为我的桌面
那先上代码吧:
[StructLayout(LayoutKind.Sequential)]
public struct MARGINS
{
public int Left;
public int Right;
public int Top;
public int Bottom;
}
[DllImport(dwmapi.dll, PreserveSig