Cassio
Junior Contributor
I want to disable the buttons of the mouse when its clicked on a textbox, so the user wont select and copy its contents. Whats the best way to do this? What i´m doing is putting the foccus on another control, like this:
But this is ugly.
Visual Basic:
Private Sub txtpergunta_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles txtpergunta.MouseDown
If e.Button = MouseButtons.Left Or e.Button = MouseButtons.Right Then
cmdAvançar.focus()
End If
End Sub
But this is ugly.