public static extern int DwmExtendFrameIntoClientArea(IntPtr hwnd, ref Margins margins);
private void DirectorySearchDialog_Shown(object sender, EventArgs e) { Text = String.Format(Text, ProjectName, Program.VersionString); if (NativeMethods.DwmIsCompositionEnabled()) { _margins = new Margins {Top = 38}; NativeMethods.DwmExtendFrameIntoClientArea(Handle, ref _margins); } _ftp = new FtpManager(Host, Port, null, Username, Password, null, UsePassiveMode, FtpAssemblyPath, Protocol); LoadListAsync(); }