P
papalarge
I've noticed that Ctrl+i creates a Tab, whereas I'd like to make it
italicize instead. My code is as follows
Private Sub txtPrivate_KeyDown(ByVal sender As System.Object, ByVal e
As System.Windows.Forms.KeyEventArgs) Handles txtPrivate.KeyDown
'IF CTRL WAS PRESSED
If e.Control Then
'IF "I" WAS PRESSED TOO
If e.KeyCode = Keys.i Then
If Not txtPrivate.SelectionFont Is Nothing Then
'MAKE SELECTED TEXT ITALIC
If txtPrivate.SelectionFont.Italic Then newFontStyle =
FontStyle.Regular Else newFontStyle = FontStyle.Italic
End If
end if
end if
End Sub
How can I suppress the default event that happens when creating a tab
character, so that my italic will take place only?
italicize instead. My code is as follows
Private Sub txtPrivate_KeyDown(ByVal sender As System.Object, ByVal e
As System.Windows.Forms.KeyEventArgs) Handles txtPrivate.KeyDown
'IF CTRL WAS PRESSED
If e.Control Then
'IF "I" WAS PRESSED TOO
If e.KeyCode = Keys.i Then
If Not txtPrivate.SelectionFont Is Nothing Then
'MAKE SELECTED TEXT ITALIC
If txtPrivate.SelectionFont.Italic Then newFontStyle =
FontStyle.Regular Else newFontStyle = FontStyle.Italic
End If
end if
end if
End Sub
How can I suppress the default event that happens when creating a tab
character, so that my italic will take place only?