public void Win32_Write(string str) { Win32Api.KeyDownString(str); }
/// <summary> /// 设置窗口在最前面 /// </summary> /// <param name="handle"></param> public static void SetWindowFirst(IntPtr handle) { Win32Api.ShowWindow(handle, 1); Thread.Sleep(300); Win32Api.SetWindowPos(handle, -1, 0, 0, 0, 0, 1 | 2); }