我正在为隐藏目标程序编写程序,实际上它可以工作,但是当我以管理员身份运行程序时,showWindow 功能不起作用。我该如何解决这个问题?
private void button1_Click(object sender, EventArgs e)
{
Process mbot = null;
pHandle = IntPtr.Zero;
foreach (var process in Process.GetProcesses())
{
if (process.ProcessName == "mBot_vSRO110")
{
mbot = process;
}
}
pHandle = mbot.MainWindowHandle;
Thread.Sleep(100);
}
ShowWindow(pHandle, 0);
}