windowontop.bas

来自「该程序是用VC源代码编写的」· BAS 代码 · 共 16 行

BAS
16
字号

Private Declare Function SetWindowPos Lib "user32" _
         (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
          ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long      

Const HWND_TOPMOST = -1
Const SWP_NOMOVE = &H2  
Const SWP_NOSIZE = &H1


Public Function PutWindowOnTop (pFrm as Form)
  Dim lngWindowPosition As Long
  
  LngWindowPosition = SetWindowPos(pFrm.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)

End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?