Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.Text = X
Text2.Text = YText3.Text = Screen.Width
Text4.Text = Screen.HeightIf Text2.Text = Text4.Text - 20 Then
MsgBox ("到底了")
Else
End If
End Sub
'我希望鼠标到屏边缘以后提示 到边了,,但是为什么没有效果呢。。哪里错了。

解决方案 »

  1.   

    Private Sub Form_Load()
     Form1.Height = Screen.Height
      Form1.Top = 0
    End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Text1.Text = X
    Text2.Text = Y
    Text3.Text = Screen.Width
    Text4.Text = Screen.HeightIf Val(Text4.Text) - Val(Text2.Text) < 1000 Then
    MsgBox ("到底了")
    Else
    End If
    End Sub
      

  2.   

    Private Sub Form_Load()
     Form1.Height = Screen.Height
      Form1.Top = 0
    End SubPrivate Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Text1.Text = X
    Text2.Text = Y
    Text3.Text = Screen.Width
    Text4.Text = Screen.HeightIf Val(Text4.Text) - Val(Text2.Text) < 1000 Then
    MsgBox ("到底了")
    Else
    End If
    End Sub
    screen和form是不同的