I am a newbie with C#
As i trying to find handle to window, i imported an external function from user32.dll :
It works fine when i send to function both arguments and retreives me a handle, but if i send only a ClassName i dont get a handle !!!
ClassName is enought for FindWindow() to return handle.
It doesnt works when i try :
If anybody knows how to solve this problem please help
If anybody knows how to get handle of any window in another way i will be greatefull to hear how
As i trying to find handle to window, i imported an external function from user32.dll :
Code:
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern IntPtr FindWindow(string strClassName, string strWindowName);
ClassName is enought for FindWindow() to return handle.
It doesnt works when i try :
Code:
IntPtr hWnd = FindWindow("MyClass", string.Empty);
IntPtr hWnd = FindWindow("MyClass", "");
If anybody knows how to get handle of any window in another way i will be greatefull to hear how