using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; using System.Windows.Forms; namespace InstrumentalCsharp { public partial class WExplorerPadrao : Form { [StructLayout(LayoutKind.Sequential)] public struct MARGINS { public int cxLeftWidth; // width of left border that retains its size public int cxRightWidth; // width of right border that retains its size public int cyTopHeight; // height of top border that retains its size public int cyBottomHeight; // height of bottom border that retains its size }; [DllImport("dwmapi.dll", PreserveSig = false)] public static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref MARGINS margins); [DllImport("dwmapi.dll", PreserveSig = false)] public static extern bool DwmIsCompositionEnabled(); public WExplorerPadrao() { InitializeComponent(); } protected void WExplorerPadrao_Load(object sender, System.EventArgs e) { WExplorerPadrao.MARGINS margins = new WExplorerPadrao.MARGINS(); margins.cxLeftWidth = 0; margins.cxRightWidth = 0; margins.cyTopHeight = 20; margins.cyBottomHeight = 0; IntPtr hwnd = this.Handle; WExplorerPadrao.DwmExtendFrameIntoClientArea(hwnd, ref margins); } } }
Math.Abs(pos.Y)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)