Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Ctrl+E menu shortcut
Message
From
21/07/2008 10:28:42
 
 
To
17/07/2008 12:22:47
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01326710
Message ID:
01332787
Views:
8
>Ctrl+E is used in my VFP application and users expect that this key will work.
>So I must make it work.


Andrus, did you find a workaround for this yet? I toyed with it some this weekend and came up with something. Basically, in your TextBox class, you need to override the ProcessCmdKey and do some extra processing if the TextBox is ReadOnly:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
  switch (keyData)
  {
	case Keys.Control | Keys.E:
		if (this.ReadOnly == true)
		{
			this.ReadOnly = false;
			bool returnvalue = base.ProcessCmdKey(ref msg, keyData);
			this.ReadOnly = true;
			return returnvalue;
		}
		else
			return base.ProcessCmdKey(ref msg, keyData);
  }
  return base.ProcessCmdKey(ref msg, keyData);
}
~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform