主要想通过获得另外一个程序的窗体里面的控件句柄,这个程序是用.Net托管代码编译的。窗体句柄可以获得现在主要就是控件类名的判断使用ManagedSpyLib.dll可以获得类名为System.Windows.Forms.TabControl使用AutoIt V3 Windows Info可以获得类名为
>>>> Control <<<<
Class: WindowsForms10.SysTabControl32.app.0.33c0d9d而使用VS2008自带的SPY++可以获得类名为
WindowsForms10.Window.8.app.0.33c0d9dManagedSpyLib.dll和AutoIt V3 Windows Info获得的控件名是一样的,都是tabControl1我到底应该依据哪一个类名来获得控件句柄那?[DllImport("user32.dll", SetLastError = true)]
        public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle);FindwidowEx函数的第四个参数是不是跟控件名没有关系,直接填写控件的标题就行了?