Hi Gary,
Thank you very much. It works like a charm. Cut, copy, paste also work
based on the control key sequences (eg "^C" for copy). However, I am not
able to get Select All to work. The "^A" sequence does not have any effect.
Is there a special command for this in a simple edit control?
Hi Ivan,
Is there a way of generating a keyboard character event
and sending it to a control on a form?
Have you tried the System.Windows.Forms.SendKeys class?
I suggest you can set the focus to the target control first, then call the
System.Windows.Forms.SendKeys.Send method to send the keystroke, such as:
Control1.Focus()
System.Windows.Forms.SendKeys.Send("{DEL}")
Please refer to the following MSDN documentation for the details:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwindowsformssendkeysclasstopic.asp
Thanks!
Best regards,
Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng06 when prompted. Once you have entered the
secure code mmpng06, you will be able to update your profile and access the
partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================