private void btnPress_Click(object sender, EventArgs e)
{
String key = ((Button)sender).Text;
InputSimulator.SimulateTextEntry(key);
SendKeys.SendWait(VirtualKeyCode.NUMPAD4.ToString());
}
[DllImport("user32.dll")]
public static extern int SetForegroundWindow(IntPtr hWnd);
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new KeyPress());
}
このことは助けてください動作していません。テキストボックスをクリックしてボタン1をクリックすると、ここに1が表示されず、テキストボックスのフォーカスも失われます..