// Aero Glass settings // private void MainForm_Load(object sender, EventArgs e) { // Perform special processing to enable aero if (SafeNativeMethods.IsAeroEnabled) { ThemeMargins margins = new ThemeMargins(); margins.TopHeight = canvas.Top; margins.LeftWidth = canvas.Left; margins.RightWidth = ClientRectangle.Right - gridSamples.Right; margins.BottomHeight = ClientRectangle.Bottom - canvas.Bottom; // Extend the Frame into client area SafeNativeMethods.ExtendAeroGlassIntoClientArea(this, margins); } }
/// <summary> /// Raises the <see cref="E:System.Windows.Forms.Form.Load"/> event. /// </summary> protected override void OnLoad(EventArgs e) { base.OnLoad(e); cbTheora.Bind(b => b.Checked, viewModel, m => m.ToOgg); cbWebM.Bind(b => b.Checked, viewModel, m => m.ToWebM); cbMp4.Bind(b => b.Checked, viewModel, m => m.ToMP4AAC); // Perform special processing to enable aero if (SafeNativeMethods.IsAeroEnabled) { margins = new ThemeMargins(); margins.TopHeight = panel1.Top + 1; margins.LeftWidth = panel1.Left + 1; margins.RightWidth = ClientRectangle.Right - panel1.Right + 1; margins.BottomHeight = ClientRectangle.Bottom - panel1.Bottom + 1; // Extend the Frame into client area SafeNativeMethods.ExtendAeroGlassIntoClientArea(this, margins); } }