public Form1() { this.Load += new System.EventHandler(this.Form1_Load); InitializeComponent(); this.ClientSize = new System.Drawing.Size(591, 342); this.Text = "A-Battle Subway Editor " + ProductVersion; this.FitGlass(); VistaApi.DwmExtendFrameIntoClientArea(this.Handle, ref marg); }
private void FitGlass() { // If DWM is not enabled then get out if (!this.IsGlassEnabled()) { return; } // Set the Margins to their default values marg.Top = this.ClientSize.Height; // extend from the top marg.Left = 0; // not used in this sample but could be marg.Right = 0; // not used in this sample but could be marg.Bottom = 0; // not used in this sample but could be this.Paint += new PaintEventHandler(this.Form1_Paint); // call the function that gives us glass, // passing a reference to our inset Margins VistaApi.DwmExtendFrameIntoClientArea(this.Handle, ref marg); }