我正在使用此代码:
IntPtr hwndf = this.Handle;
IntPtr hwndParent = FindWindow("ProgMan.exe", null);
SetParent(hwndf, hwndParent);
但是我收到错误。错误说:
以下方法或属性之间的调用不明确: 'HyperBox.Form1.FindWindow(string,string)'和 'HyperBox.Form1.FindWindow(string,string)'
我该如何解决这个问题?感谢。
答案 0 :(得分:-1)
将null转换为字符串,以便程序知道要使用哪些重写方法:
IntPtr hwndf = this.Handle;
IntPtr hwndParent = FindWindow("ProgMan.exe", (string)null);
SetParent(hwndf, hwndParent);