Does .NET provide any functionality for sending a key to another window. I just want to simulate a keypress on another application. Will I have to resort to some kind of API, or does .NET have something built-in? Thanks.
Printable View
Does .NET provide any functionality for sending a key to another window. I just want to simulate a keypress on another application. Will I have to resort to some kind of API, or does .NET have something built-in? Thanks.
Nope, sendmessage is still the way to go ;)
Ok, thanks, I'll look into that. Does .NET provide any functionality for capturing keys? I remember vb6 had no real way to create a global keyboard hook, has this changed in .NET? I guess I'm sort of asking about a keylogger.
There's no built-in way. But several people have written implemantations that you can take advantage of. Check out the following article.
http://www.codeproject.com/csharp/globalsystemhook.asp