L
Logan
I need to get the executable name for window under the cursor. I feel like
my code is pretty close but the i never find a process.Handle that matches
the handle under my mouse.
here is my code:
public object ParentExecutable(IntPtr hWndUnderMouse)
{
object p = null;
System.Diagnostics.Process[] allProcesses =
System.Diagnostics.Process.GetProcesses();
for(int iii = 0; iii < allProcesses.Length; iii++)
{
try
{
if(((System.Diagnostics.Process)allProcesses[iii]).Handle ==
hWndUnderMouse)
{
p = ((System.Diagnostics.Process)allProcesses[iii]);
iii = allProcesses.Length;
}
}
catch{}
}
return p;
}
Thanks in advance for any help,
~Logan
my code is pretty close but the i never find a process.Handle that matches
the handle under my mouse.
here is my code:
public object ParentExecutable(IntPtr hWndUnderMouse)
{
object p = null;
System.Diagnostics.Process[] allProcesses =
System.Diagnostics.Process.GetProcesses();
for(int iii = 0; iii < allProcesses.Length; iii++)
{
try
{
if(((System.Diagnostics.Process)allProcesses[iii]).Handle ==
hWndUnderMouse)
{
p = ((System.Diagnostics.Process)allProcesses[iii]);
iii = allProcesses.Length;
}
}
catch{}
}
return p;
}
Thanks in advance for any help,
~Logan