Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Window opens up on the left right corner

Discussion in 'Windows' started by leblitzer, Jan 19, 2023.

  1. leblitzer

    leblitzer

    Joined:
    Jul 14, 2022
    Posts:
    1
    Hi,

    Window opens up on the left right corner for matter of second

    I want it appears on the center directly for prevent that glitch.

    Is it possbile to hide the window when unity instaciate it?

    I use c# dll for my window:
    private void ModeColorkey(int i)
    {
    hWnd = GetActiveWindow();
    MARGINS margins = new MARGINS { cxLeftWidth = -1 };
    DwmExtendFrameIntoClientArea(hWnd, ref margins);
    SetWindowLong(hWnd, GWL_EXSTYLE, WS_EX_LAYERED);
    SetLayeredWindowAttributes(hWnd, 0x00000000, 0, 0);
    SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, i);
    Application.runInBackground = true;
    }
     

    Attached Files: