Rich Text Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Still looking for the Rich Text Box property or method which will inform if
it is in overwrite or insert mode. Does anyone know where it is?
 
Hi,

this does the rick for me, place a richtextbox and a button on a form

<<<<<code>>>>>
Private blnInsert As Boolean = False

Private Sub RichTextBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles RichTextBox1.KeyDown
If e.KeyCode = Keys.Insert Then
blnInsert = Not blnInsert
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If blnInsert = True Then
MsgBox("insert = ON")
Else
MsgBox("insert = OFF")
End If
End Sub
<<<<<code>>>>>


hth Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top