pipe
asked on
Disable RichTextBox Left Mouse Click
hi-
how can i disable the left mouse click for a richtextbox so a user cannot move the caret?
thanks -p
how can i disable the left mouse click for a richtextbox so a user cannot move the caret?
thanks -p
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't think u can disable the cursor from appearing the textbox.
What u can do is
Deviate the focus to some other textbox or any other control ex.
Private Sub TextBox1_MouseDown(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles TextBox1.MouseDown
If e.Button = MouseButtons.Left Then
textbox2.Select()
End If
End Sub
What u can do is
Deviate the focus to some other textbox or any other control ex.
Private Sub TextBox1_MouseDown(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles TextBox1.MouseDown
If e.Button = MouseButtons.Left Then
textbox2.Select()
End If
End Sub
ASKER
"how about used "hidecaret" to hide the caret from the user"
hiding the caret would work i think. however, i checked msdn and i didnt see any method for doing this with a richtextbox. do you know how i would go about doing this?
thx
hiding the caret would work i think. however, i checked msdn and i didnt see any method for doing this with a richtextbox. do you know how i would go about doing this?
thx
I tried the cursor.hide method. But that works well for a button control. But it does not work for a textbox. So I think my previous reply holds good :-)
who asked about the cursor ..
I thought it was all about the caret ..
I thought it was all about the caret ..
ASKER
i did a dll import of the hidecaret method. i got it working. i think i call it on mouseenter or over. thx
ASKER