yzx99

导航

 
以下代码中,如果不是用Picture来实现,而直接用Form来实现,好像不太成功
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim bMouseIn As Boolean
  bMouseIn = (0 <= X) And (X <= Picture1.Width) And (0 <= Y) And (Y <= Picture1.Height)
  Debug.Print X, Y, bMouseIn
  If bMouseIn Then
    SetCapture Picture1.hWnd
    If lState = 0 Then
      lState = 1
      Me.Height = 2400
    Else
    End If
  Else
    ReleaseCapture
    If lState = 1 Then
      lState = 0
      Me.Height = 120
    Else
    End If
  End If
End Sub
posted on 2006-08-30 16:34  yzx99  阅读(450)  评论(1编辑  收藏  举报