0
在大廈的窗口,我設置的遊戲一樣的可調整大小的窗口:https://i.stack.imgur.com/bC3oW.png如何限制可調整大小的窗口的分辨率?
我怎樣才能限制這種可調整大小的窗口的分辨率調整其大小時(例如,如果分辨率低於1280 * 720,它將停止調整大小)?
在大廈的窗口,我設置的遊戲一樣的可調整大小的窗口:https://i.stack.imgur.com/bC3oW.png如何限制可調整大小的窗口的分辨率?
我怎樣才能限制這種可調整大小的窗口的分辨率調整其大小時(例如,如果分辨率低於1280 * 720,它將停止調整大小)?
實際上,它可以使用以下方式解決,但並不完美:
//to change the size and pos
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int MoveWindow(IntPtr hWnd, int x, int y, int nWidth, int nHeight, bool BRePaint);
//to get the Window Handle
[DllImport("User32.dll", EntryPoint = "FindWindow")]
public extern static IntPtr FindWindow(string lpClassName, string lpWindowName);
最後一個尚未解決的問題是我能得到這個窗口句柄的當前位置,它總是會在(x的位置設置,y)