using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace ConsoleApp1 { class Program { [DllImport("user32.dll", EntryPoint = "FindWindowEx")] private static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); static void Main(string[] args) { IntPtr maindHwnd = FindWindowEx((IntPtr)0, (IntPtr)0,"窗体Class",&