BorderlessGaming.BorderlessGaming.RemoveBorder_ToSpecificScreen C# (CSharp) Method

RemoveBorder_ToSpecificScreen() public method

remove the menu, resize the window, remove border, and maximize
public RemoveBorder_ToSpecificScreen ( IntPtr hWnd, Screen screen, Favorites favDetails = null, System.Boolean overrideTimeout = false ) : void
hWnd System.IntPtr
screen System.Windows.Forms.Screen
favDetails Favorites
overrideTimeout System.Boolean
return void
        public void RemoveBorder_ToSpecificScreen(IntPtr hWnd, Screen screen, 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_ToSpecificScreen(hWnd, screen, favDetails, true));
                task.Wait(TimeSpan.FromSeconds(10));
            }

            var pd = _processDetails.FromHandle(hWnd);
            Manipulation.MakeWindowBorderless(pd, window, hWnd, screen.Bounds, favDetails ?? _favorites.FromProcessDetails(pd));
        }