Im playing around in C# and want my little console program to spell my name in a notepad window I have open. I've got the window handle (IntPtr) but don't really know what to do from here.
I could use SendKey but I want it to work whenever the notepad has focus or not, and as I understand it Senkey only work if you have the windowed focused :(
EDIT: I've tried the following (trying to simulate pressing B):
PostMessage(NotepadWindowHandle, 0x100, 0x42, 0);
Thread.Sleep(1000);
PostMessage(NotepadWindowHandle, 0x101, 0x42, 0);
Nothing happens :( And it does not break