返回列表 上一主題 發帖

[發問] 如何放入form

[發問] 如何放入form

請教大大,以下如何放入form?試了還是出不到效果...
The following example determines where the mouse is and whether the left mouse button and/or the SHIFT key is pressed. The x and y coordinates of the mouse pointer position are displayed in a label control as you move the mouse.

To try the example, add the following event procedure to a form that contains a label named Coordinates:

Private Sub Detail_MouseMove(Button As Integer, _
     Shift As Integer, X As Single, Y As Single)
    Dim intShiftDown As Integer, intLeftButton As Integer

    Me!Coordinates.Caption = X & ", " & Y
    ' Use bit masks to determine state of
    ' SHIFT key and left button.
    intShiftDown = Shift And acShiftMask
    intLeftButton = Button And acLeftButton
    ' Check that SHIFT key and left button
    ' are both pressed.
    If intShiftDown And intLeftButton > 0 Then
        MsgBox "Shift key and left mouse button were pressed."
    End If
End Sub

回復 2# 暗黑


    謝謝大大!請指教那裡錯...
滑鼠座標.rar (11.22 KB)

TOP

回復 4# 暗黑


    成了!謝謝大大!

TOP

        靜思自在 : 難行能行,難捨能捨,難為能為,才能昇華自我的人格。
返回列表 上一主題