0

Possible Duplicate:
Borderless application on maximize is hiding behind the task bar in Win 7 and Win 8

my windowstyle is none and I maximized the window the window is behind the task bar and I cannot see the while window properly. i tries this but it doesn't work:

this.MaxHeight = SystemParameters.VirtualScreenHeight;
this.MaxWidth = SystemParameters.VirtualScreenWidth;
4

1 に答える 1

0

あなたが始めることができる何か:

    [DllImport("user32.dll")]
    private static extern int FindWindow(string lpszClassName, string lpszWindowName);
    [DllImport("user32.dll")]
    private static extern int ShowWindow(int hWnd, int nCmdShow);
    private const int SW_HIDE = 0;
    private const int SW_SHOW = 1;

    public void WindowsToolbar(bool visible)
    {
        int hWnd = FindWindow("Shell_TrayWnd", "");
        ShowWindow(hWnd, visible ? SW_SHOW : SW_HIDE);
    }

    public void HideTaskBarIfNeeded(Form form)
    {
        if (Screen.PrimaryScreen.Equals(Screen.FromRectangle(Screen.GetBounds(form))))
        {
            WindowsToolbar(false);
        }
    }
于 2012-09-10T12:44:22.060 に答える