让一个App永远保持在最上层

    技术2022-05-11  97

      ' '请在声明区中加入以下声明  Private   Declare   Function SetWindowPos Lib "user32" (ByVal hwnd As LongByVal hWndInsertAfter As LongByVal x As LongByVal y As LongByVal cx As LongByVal cy As LongByVal wFlags As LongAs Long Const SWP_NOMOVE = &H2 ''不更动目前视窗位置 Const SWP_NOSIZE = &H1 ''不更动目前视窗大小 Const HWND_TOPMOST = -1 ''设定为最上层 Const HWND_NOTOPMOST = -2 ''取消最上层设定 Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE ''将 APP 视窗设定成永远保持在最上层 SetWindowPos Me.hwnd, HWND_TOPMOST, 0000, FLAGS ''取消最上层设定 SetWindowPos Me.hwnd, HWND_NOTOPMOST, 0000, FLAGS 

    最新回复(0)