日期:2014-05-18  浏览次数:21146 次

C#获取外界窗体,求大家帮忙
我用control.from开头,hadle结尾那个方法,手机上的,没背全,请原谅,写this句柄能获取,但是用process获取句柄就不可以,或给个别的方法。谢谢高手了,我想通过句柄获取窗体对象,并改里面属性

------解决方案--------------------
EnumChildWindows P/invoke的声明

[DllImport("user32")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EnumChildWindows(IntPtr window, EnumWindowProc callback, IntPtr i);