E
enahar
Hello,
i want to find out how many instances of a form (say childForm1) is
running using FindWindowEx but value return is always zero by this method.
What wrong I am doing it..Can anybody help me to find the no. of form
instances running ?
Thanks.
Below is the code
I have already declared
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter,
string lpszClass, string lpszWindow);
string lpszClass = childForm.Name;
IntPtr ParenthWnd = new IntPtr(0);
ParenthWnd = FindWindowEx(ParenthWnd,hWnd,lpszClass,"");
if (ParenthWnd .Equals(IntPtr.Zero))
Console.WriteLine("childForm.Name is not running?");
else
Console.WriteLine("childForm.Name is running?");
return;
i want to find out how many instances of a form (say childForm1) is
running using FindWindowEx but value return is always zero by this method.
What wrong I am doing it..Can anybody help me to find the no. of form
instances running ?
Thanks.
Below is the code
I have already declared
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter,
string lpszClass, string lpszWindow);
string lpszClass = childForm.Name;
IntPtr ParenthWnd = new IntPtr(0);
ParenthWnd = FindWindowEx(ParenthWnd,hWnd,lpszClass,"");
if (ParenthWnd .Equals(IntPtr.Zero))
Console.WriteLine("childForm.Name is not running?");
else
Console.WriteLine("childForm.Name is running?");
return;