What I want to do is create a simple Windows application that will snap to NotePad and then simulate a keystroke. I have the process of opening a NotePad, bringing it to the fore, and then simulating the number 1 by pressing. However, if I clicked on a notebook, everything that is active will become what is typed.
How to attach this application to a notebook so that I can click and type anything, and this application will still enter commands into a notebook?
This is the DLL I use to simulate keystrokes :
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.Diagnostics; using WindowsInput; namespace NotePadTesting { class Program { [DllImport("USER32.DLL", CharSet = CharSet.Unicode)] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
c # process hook
user222427
source share