C # form with Aero Effect

Source: Internet
Author: User

Using System. runtime. interopServices; // reference where to put it .... [DllImport ("dwmapi. dll ")] public static extern int dwmextendframeworkclientarea (IntPtr hWnd, ref MARGINS pMarinset); [StructLayout (LayoutKind. sequential)] public struct MARGINS {public int Right; public int left; public int Top; public int Bottom;} private void Form1_Load (object sender, EventArgs e) {this. backgroundImage = null; MARGINS marg Ins = new MARGINS (); margins. left =-1; margins. right =-1; margins. top =-1; margins. bottom =-1; IntPtr hwnd = Handle; int result = dwmexico tendframeworkclientarea (hwnd, ref margins); this. backColor = Color. black; this. label1.Text = "... "; This. label1.BackColor = Color. transparent; this. label1.ForeColor = Color. white;} using System. runtime. interopServices; // reference where to put it .... [DllImport ("dwmapi. dll ")] public static extern int dwmextendframeworkclientarea (IntPtr hWnd, ref MARGINS pMarinset); [StructLayout (LayoutKind. sequential)] public struct MARGINS {public int Right; public int left; public int Top; public int Bottom;} private void Form Upload load (object sender, EventArgs e) {this. backgroundImage = null; MARGINS margins = new MARGINS (); margins. left =-1; margins. right =-1; margins. top =-1; margins. bottom =-1; IntPtr hwnd = Handle; int result = dwmexico tendframeworkclientarea (hwnd, ref margins); this. backColor = Color. black; this. label1.Text = "... "; This. label1.BackColor = Color. Transparent; this. label1.ForeColor = Color. White ;}

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.