窗体置顶
<DllImport("user32.dll", CharSet:=CharSet.Auto)> _
Private Shared Function SetWindowPos(ByVal hWnd As IntPtr, _
ByVal hWndInsertAfter As Integer, _
ByVal x As Integer, _
ByVal y As Integer, _
ByVal Width As Integer, _
ByVal Height As Integer, _
ByVal flags As Integer) As Integer
End Function
Public Shared ReadOnly HWND_TOPMOST As New IntPtr(-1)
'窗体置顶
Public Shared ReadOnly HWND_NOTOPMOST As New IntPtr(-2)
'取消窗体置顶
Public Const SWP_NOMOVE As UInteger = &H2
'不调整窗体位置
Public Const SWP_NOSIZE As UInteger = &H1
SetWindowPos(HWD, HWND_TOPMOST, 1, 1, 1, 1, SWP_NOMOVE Or SWP_NOSIZE)
暂时没有评论