1。如题:有谁知道怎样让一个form显示时在屏幕的最上方啊??2。statusBar控件的使用,如何用case语句判断单击panels(1),panels(2)的哪个??

解决方案 »

  1.   

    '******************************设置窗体置顶*****************************************
    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
      

  2.   

    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