0

我正在使用这段代码:

IntPtr hwndf = this.Handle;
IntPtr hwndParent = FindWindow("ProgMan.exe", null);
SetParent(hwndf, hwndParent);

但是我得到一个错误。错误说:

以下方法或属性之间的调用不明确:'HyperBox.Form1.FindWindow(string, string)' 和 'HyperBox.Form1.FindWindow(string, string)'

我怎样才能解决这个问题?谢谢。

4

1 回答 1

-1

将 null 转换为字符串,以便程序知道要使用哪些被覆盖的方法:

IntPtr hwndf = this.Handle;
IntPtr hwndParent = FindWindow("ProgMan.exe", (string)null);
SetParent(hwndf, hwndParent);
于 2012-11-10T00:37:56.187 回答