I use the following code to do what you want to do. I have changed some names to protect the innocent, so where you values inside <>, just change it to reflect what you need. Usage: Just copy and paste into a class file. Good Luck!:-D using System; using System.Text; using System.Runtime.InteropServices; using System.Diagnostics; namespace APPLoginWindow { /// /// Summary description for Class1. /// public class APPLogin { private object data; #region Contructor, dispose, main public APPLogin() { getAPPLogin(); } #endregion #region win32 imports public delegate bool EnumWindowsCallback(int hwnd, int lParam); public delegate bool EnumThreadProc(IntPtr hWnd, IntPtr lParam); [DllImport("User32.dll")] public static extern int GetWindowText(int hwnd,StringBuilder lpString, uint bufferSize); [DllImport("User32.dll")] public static extern int EnumWindows (EnumWindowsCallback callback, int lParam); [DllImport("User32.dll")] public static extern int EnumChildWindows (int hWndParent, EnumWindowsCallback callback, int lParam); [DllImport("User32.dll")] public static extern bool EnumThreadWindows (uint threadId, EnumThreadProc pfnEnum, IntPtr lParam); [DllImport("User32.dll")] public static extern int RealGetWindowClass(int hWnd,StringBuilder pszType,uint bufferSize); [DllImport("User32.dll")] public static extern int SendMessage( int hwnd, int uMsg, int wParam, [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPStr)] string lParam); [DllImport("User32.dll") ] public static extern int FindWindow (string lpClassName,string WindowName); [DllImport("User32.dll") ] public static extern int FindWindowEx (int hWnd,int hWnd2,string lpsz,string lpsz2); [DllImport("User32.dll") ] public static extern int SetWindowText(int hWnd,string lpsz); #endregion #region Constants + fields public static int GW_HWNDNEXT = 2; public static int GW_CHILD = 5; public static int GW_OWNER = 4; public static int GWL_HWNDPARENT = -8; public static int WM_SETTEXT = 12; public const int HWND_MESSAGE = -3; public const int BM_CLICK = 0x00F5; //Clicking a button public const int WM_CHAR = 258; private string _windowText = ""; #endregion #region Callback functions for listing windows private bool displayAPPLogin(int hWnd, int lParam) { StringBuilder windowName = new StringBuilder(255); StringBuilder className = new StringBuilder(255); GetWindowText(hWnd, wind