<pre> ''' <summary> ''' Overwrites the MouseDown event of the base class of the control. ''' </summary> ''' <param name="e"></param> Protected Overrides Sub OnMouseDown(e As MouseEventArgs) ' 'The current position of the Mouse is obtained. Me._mousePositionMove = e.Location 'Check that you have pressed the left mouse button. If e.Button = MouseButtons.Left Then ' 'It is verified that there is no saved in the variable, a data 'which indicates that the mouse has been pressed in the control. If Not Me._mousePress = True Then ' 'The mouse button was pressed. Me._mousePress = True ' 'Obtiene las coordenadas del puntero del Mouse cuando se presionó el Mouse. Me._mouseDown_Location = e.Location 'Traslation Old Axis X. Me._TraslationX_Graphics_old = Me._TraslationX_Graphics 'Traslation Old Axis Y. Me._TraslationY_Graphics_old = Me._TraslationY_Graphics ' 'In this case the drawing is only being adjusted with its Pan and Zoom. IsZoomPan_MouseEvent = True 'I indicate in False the variable that indicates that the drawing fits 'to the current screen. IsFitDrawingToControl_ClikButtonEvent = False End If ' End If ' 'I also indicate that the reference lines of the Mouse must be drawn. LineasReferenciaMouse_Dibujar = True ' 'The control is redrawn in your Paint event. Me.Invalidate() ' 'Invokes the MouseDown event of the control. MyBase.OnMouseDown(e) End Sub