例如,我想從瀏覽器獲取句柄。
private void button1_Click(object sender, EventArgs e)
{
Process.Start("https://google.com/");
//How to get handle of this process?
}
uj5u.com熱心網友回復:
Process.Start()回傳Process新創建行程的物件。
在下面的示例中,myProcess.Handle將成為所述行程的句柄。
var myProcess = Process.Start("notepad.exe");
Console.WriteLine(myProcess.Handle);
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/379710.html
上一篇:我找不到任何使用WindowsFormsControls和(或)Infragistics構建的.NET4.0應用程式
