API 声明:
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
需要置顶时候的代码:
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 3
取消置顶的代码:
SetWindowPos Me.hwnd, -2, 0, 0, 0, 0, 3