呼叫模棱两可:Findwindow(String,String);



我正在使用此代码:

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

但是我有一个错误。错误说:

呼叫在以下方法或属性之间是模棱两可的: 'hampox.form1.findwindow(字符串,字符串)'和 'hampox.form1.findwindow(字符串,字符串)'

我该如何解决?谢谢。

将null施加到字符串中,以便程序知道要使用哪种覆盖方法:

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

最新更新