vb6代码之如何实现窗口置顶

2020年8月25日09:25:26 发表评论 35 views

vb6代码之如何实现窗口置顶

新建立类模块:

Option Explicit

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)

窗口代码:

Dim rtn
'让窗口在顶层
rtn = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3)
'取消窗口在顶层
'rtn = SetWindowPos(F_V.hwnd, -2, 0, 0, 0, 0, 3)


发表评论

您必须才能发表评论!