如何在c#中创建一个完整的玻璃,圆框形式?

时间:2014-01-26 03:34:04

标签: c# forms aero-glass

以下是我希望表单的外观: enter image description here

这是我到目前为止所尝试的内容:

    [StructLayout(LayoutKind.Sequential)]
    public struct MARGINS
    {
        public int Left;
        public int Right;
        public int Top;
        public int Bottom;
    }

    [DllImport("dwmapi.dll")]
    public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS pMargins);

    private void Form1_Load(object sender, EventArgs e)
    {
        MARGINS marg = new MARGINS() { Left = -1, Right = -1, Top = -1, Bottom = -1 };
        DwmExtendFrameIntoClientArea(this.Handle, ref marg);
    }

这确实使我的表格透明,但我似乎无法弄清楚如何制作圆角。

0 个答案:

没有答案