Label

超連結效果

Private Sub Label1_Click()
    Shell "Explorer http://pycchoice.uhome.net/",vbNormalFocus
End Sub


利用Label製作按鈕

按這裡下載範例

Private Sub Form_Load()
    With
Label1
        .Alignment = 2
        .BackColor = RGB(0, 0, 0)
        .ForeColor = RGB(255, 255, 255)
        .ToolTipText = "我是按鈕"
    End With
End Sub

Private Sub
Label1_Click()
    MsgBox
"我是按鈕"
End Sub

Private Sub
Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With
Label1
        .BackColor = RGB(0, 0, 255)
        .ForeColor = RGB(255, 255, 128)
        .BorderStyle = 1
        .Caption = ">>>按我<<<"
    End With
End Sub

Private Sub
Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With
Label1
        .BackColor = RGB(0, 0, 0)
        .ForeColor = RGB(255, 255, 255)
        .BorderStyle = 0
        .Caption = "按我"
    End With
End Sub