'******************************设置窗体置顶***************************************** Public Function SetWindowsOnTop(hwnd As Long, flag As Boolean) As Long If flag = True Then SetWindowPos hwnd, -1, 0, 0, 0, 0, 3 Else SetWindowPos hwnd, -2, 0, 0, 0, 0, 3 End If End Function
Private Sub StatusBar1_PanelClick(ByVal Panel As MSComctlLib.Panel) Select Case Panel.Index Case 1 MsgBox "you click panel1" Case 2 MsgBox "you click panel2" End Select End Sub
Public Function SetWindowsOnTop(hwnd As Long, flag As Boolean) As Long
If flag = True Then
SetWindowPos hwnd, -1, 0, 0, 0, 0, 3
Else
SetWindowPos hwnd, -2, 0, 0, 0, 0, 3
End If
End Function
Select Case Panel.Index
Case 1
MsgBox "you click panel1"
Case 2
MsgBox "you click panel2"
End Select
End Sub