Re: Keyboard Event Problems
it's an indent. couldn't you use a different key combination? Alt+i or something?
Re: Keyboard Event Problems
ok. i investigated. it seems to insert a tab. here's a workaround:
vb Code:
Public Class Form1
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.Modifiers = Keys.Control AndAlso e.KeyCode = Keys.I Then
RichTextBox1.SelectionFont = New Font(RichTextBox1.SelectionFont, FontStyle.Italic)
e.SuppressKeyPress = True
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.KeyPreview = True
End Sub
End Class
Re: Keyboard Event Problems
K ty, e.surpresskeypress prevents the auto action :)