private static extern IntPtr FindWindowEx(IntPtr parent, IntPtr childAfter, string className, string windowName); [Dllimport("user32.dll", EntryPoint = "FindWindow")] private static extern IntPtr FindWindowWin32(string className, string windowName); [Dllimport("user32.dll ")] public static extern int GetClassName(IntPtr hWnd, [Out] StringBuilder className, int maxCount); [Dllimport("user32.dll")] private static extern int SendMessage(IntPtr window, int message, int wparam, int lparam); [Dllimport("user32", CharSet = CharSet.Auto)] private extern static int SendMessage(IntPtr hWnd, int wMsg, int wParam, string lpstring); [Dllimport("user32.dll")] private static extern int PostMessage(IntPtr window, int message, int wparam, int lparam);