Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do I change service startup type Pin
Sunil G11-May-10 22:27
Sunil G11-May-10 22:27 
AnswerRe: How do I change service startup type Pin
Pete O'Hanlon11-May-10 22:44
mvePete O'Hanlon11-May-10 22:44 
AnswerRe: How do I change service startup type Pin
Sunil G11-May-10 23:07
Sunil G11-May-10 23:07 
QuestionWindowStartPosition Pin
gmhanna11-May-10 5:32
gmhanna11-May-10 5:32 
AnswerRe: WindowStartPosition Pin
William Winner11-May-10 5:55
William Winner11-May-10 5:55 
AnswerRe: WindowStartPosition Pin
Luc Pattyn11-May-10 6:17
sitebuilderLuc Pattyn11-May-10 6:17 
QuestionCTRL/I within a RichTextBox Pin
gmhanna11-May-10 5:22
gmhanna11-May-10 5:22 
AnswerRe: CTRL/I within a RichTextBox [modified] Pin
William Winner11-May-10 6:00
William Winner11-May-10 6:00 
Are you hooking the other events? Like KeyPreview or KeyPress? It works perfectly for me.

The only thing I have in my KeyDown event is:
C#
if (e.Control && e.KeyCode == Keys.I)
{
   MessageBox.Show("Ctrl+I");
}


So, if it's not getting there, then you must be handling the "I" KeyDown in some other method.


[UPDATE]

Sorry, I didn't see it was a RichTextBox. Just add this into your KeyDown:
C#
if (e.KeyCode == Keys.I && e.Control)
{
   e.SuppressKeyPress = True;
   e.Handled = True;
   ToggleFormat(FontStyle.Italic);
}


modified on Tuesday, May 11, 2010 1:40 PM

GeneralRe: CTRL/I within a RichTextBox Pin
gmhanna11-May-10 8:34
gmhanna11-May-10 8:34 
GeneralRe: CTRL/I within a RichTextBox Pin
William Winner11-May-10 9:01
William Winner11-May-10 9:01 
GeneralRe: CTRL/I within a RichTextBox Pin
gmhanna11-May-10 9:20
gmhanna11-May-10 9:20 
AnswerRe: CTRL/I within a RichTextBox Pin
Luc Pattyn11-May-10 6:19
sitebuilderLuc Pattyn11-May-10 6:19 
QuestionSet page range in PrintPreview Pin
baranils11-May-10 5:18
baranils11-May-10 5:18 
QuestionMaximum number of lines within a class Pin
Tony Pazzard11-May-10 4:44
Tony Pazzard11-May-10 4:44 
AnswerRe: Maximum number of lines within a class Pin
Luc Pattyn11-May-10 4:50
sitebuilderLuc Pattyn11-May-10 4:50 
AnswerRe: Maximum number of lines within a class Pin
#realJSOP11-May-10 6:36
professional#realJSOP11-May-10 6:36 
AnswerRe: Maximum number of lines within a class Pin
The Man from U.N.C.L.E.11-May-10 7:42
The Man from U.N.C.L.E.11-May-10 7:42 
AnswerRe: Maximum number of lines within a class Pin
PIEBALDconsult11-May-10 7:51
mvePIEBALDconsult11-May-10 7:51 
GeneralRe: Maximum number of lines within a class Pin
Luc Pattyn11-May-10 7:58
sitebuilderLuc Pattyn11-May-10 7:58 
GeneralRe: Maximum number of lines within a class Pin
PIEBALDconsult11-May-10 15:21
mvePIEBALDconsult11-May-10 15:21 
GeneralRe: Maximum number of lines within a class Pin
Luc Pattyn11-May-10 15:39
sitebuilderLuc Pattyn11-May-10 15:39 
AnswerRe: Maximum number of lines within a class Pin
Abhinav S11-May-10 7:52
Abhinav S11-May-10 7:52 
AnswerRe: Maximum number of lines within a class Pin
Bernhard Hiller12-May-10 3:56
Bernhard Hiller12-May-10 3:56 
Questionsn.exe, public key question Pin
Ryan Minor11-May-10 4:28
Ryan Minor11-May-10 4:28 
AnswerRe: sn.exe, public key question Pin
Peace ON11-May-10 4:49
Peace ON11-May-10 4:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.