private bool AdjustHelpWindowSize()
{
IntPtr helpHandle = Process.GetCurrentProcess().MainWindowHandle; // get the Help window handle
if (helpHandle == null)
{
return false;
}
MonitorInfo monitorInfo = new MonitorInfo();
monitorInfo.cbSize = Marshal.SizeOf(monitorInfo);
if (!GetMonitorInfo(MonitorFromWindow(helpHandle, MONITOR_DEFAULTTONEAREST), ref monitorInfo))
{
return false;
}
Rect workSize = monitorInfo.rcWork;
return SetWindowPos(helpHandle, IntPtr.Zero, workSize.Left, workSize.Top, workSize.Right - workSize.Left, workSize.Bottom - workSize.Top, SWP_NOZORDER);
}