BorderlessGaming.BorderlessGaming.RemoveBorder_ToSpecificRect C# (CSharp) Method

RemoveBorder_ToSpecificRect() public method

remove the menu, resize the window, remove border, and maximize
public RemoveBorder_ToSpecificRect ( IntPtr hWnd, Rectangle targetFrame, Favorites favDetails = null, System.Boolean overrideTimeout = false ) : void
hWnd System.IntPtr
targetFrame System.Drawing.Rectangle
favDetails Favorites
overrideTimeout System.Boolean
return void
        public void RemoveBorder_ToSpecificRect(IntPtr hWnd, Rectangle targetFrame, Favorites.Favorite favDetails = null, Boolean overrideTimeout = false)
        {
            if (favDetails != null && favDetails.DelayBorderless == true && overrideTimeout == false)
            {
                //Wait 10 seconds before removing the border.
                Task task = new Task(() => RemoveBorder_ToSpecificRect(hWnd, targetFrame, favDetails, true));
                task.Wait(TimeSpan.FromSeconds(10));
            }
            var pd = _processDetails.FromHandle(hWnd);
            Manipulation.MakeWindowBorderless(pd, window, hWnd, targetFrame, favDetails ?? _favorites.FromProcessDetails(pd));
        }