窗口置顶

admin2021-08-10  207

import win;


win.setTopmost(winform.hwnd,true) //置顶
win.setTopmost(winform.hwnd,false) //取消置顶

mainForm.setPos(,,,,-1/*_HWND_TOPMOST*/) //置顶2
mainForm.setPos(,,,,-2/*_HWND_NOTOPMOST*/) //取消置顶2

//置顶
::User32.SetWindowPos(winform.hwnd,-1/*_HWND_TOPMOST*/,0,0,0,0,0x2/*_SWP_NOMOVE*/|0x1/*_SWP_NOSIZE*/)

//取消置顶
::User32.SetWindowPos(winform.hwnd,-2/*_HWND_NOTOPMOST*/,0,0,0,0,0x2/*_SWP_NOMOVE*/|0x1/*_SWP_NOSIZE*/)
转载请注明原文地址: https://seopai.com/read-195.html
最新回复(0)