using System.Runtime.InteropServices;
[DllImport("user32.dll")]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
private IntPtr FindHandle(String winName)
{
IntPtr handle = FindWindow(null, winName);
return handle;
}
C#