jindalee
asked on
Disable Ctrl-A, Ctrl-C
Hello Experts
I need to disable the ability of users to select and copy text in a Rich Text Control using Ctrl-A and Ctrl-C.
How do I go about this?
Many thanks
I need to disable the ability of users to select and copy text in a Rich Text Control using Ctrl-A and Ctrl-C.
How do I go about this?
Many thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
public bool PreFilterMessage(ref Message m)
{
if (m.Msg == WM_KEYDOWN)
{
return HandleKeys((Keys)((int)m.WParam) & Keys.KeyCode);
}
return false;
}
public bool HandleKeys(Keys keycode)
{
bool ret = true;
switch (keycode)
{
case Keys.Alt | Keys.F4: this.Close();break;
case Keys.Alt | Keys.N: MoveInList(Direction.FORWARD); break;
case Keys.Alt | Keys.B: MoveInList(Direction.BACKWORD); break;
//.........
default: ret = false; break;
}
return ret;
}
ASKER
Thank you webtubbs. Worked first time.
BTW. It is good to see a moderator remind a contributor that a submission should add value to the question and should also address specifics such as programming language. Too many times you see a question asking for a response in (e.g.) VB.Net only to find loads of answers in some other language.
BTW. It is good to see a moderator remind a contributor that a submission should add value to the question and should also address specifics such as programming language. Too many times you see a question asking for a response in (e.g.) VB.Net only to find loads of answers in some other language.
Wayne