Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I intend to write an application in .Net (C#) that sets some special text for any text area of third party applications using some keyboard shortcuts.
I tried this using Send() method of SendKeys class, but problem occurs when my shortcut key is a combination of Ctrl/Alt key(s) and another key on the keyboard: When user presses the shortcut key combination, because of holding Ctrl/Alt key, the characters are sent by Send() method combine with Ctrl and result is not writing text into the text area, but doing some command.

So, I switched to a new approach and used SendMessage API using WM_SETTEXT message and everything looked good until I test my application on a WPF application.

In order to WPF structure, TextBox and all other controls on these forms have not any handle that I can use for sending messages.
Is there a solution ?
Posted
Updated 8-Nov-11 7:04am
v5

1 solution

First, This is link for SendKeys.Send Method I think that be good for clear understanding it.

Then you can see this useful link Passing Values between Forms in .NET 1.x with C# and VB.NET examples
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900