PictureBox バグ仕様対策サンプル

Option Explicit
Private m_blnMouseButtonDown As Boolean

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

	(処理)

	m_blnMouseButtonDown = True

End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

	If Button Then

		If m_blnMouseButtonDown = False Then Exit Sub

	End If

	(処理)

End Sub

Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

	If m_blnMouseButtonDown = False Then Exit Sub

	(処理)

	m_blnMouseButtonDown = False

End Sub
Hayana 2006-10-05