一位仁兄告诉我在 Win32 中可以用 Findwindow 来抓取一个窗口,用SendMessage来向抓到的窗口发送消息,可以我在C#中找不到这两个函数,是不是现在变了,谁能告诉我,谢谢了。

解决方案 »

  1.   

    using System.Runtime.InteropServices;[DllImport("Uer32")]
            public static extern void Findwindow (String strClassName, String strWindowsName);[DllImport("Uer32")]
            public static extern int SendMessage (IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam);
      

  2.   

    写错了,是
    [DllImport("user32.dll")]
      

  3.   

    popunit() ( ) 朋友写的对,不过第二个SENDMESSAGE这个API里面参数可以定义多种类型的数据类型!
      

  4.   

    popunit() ( ) 朋友写的对,不过第二个SENDMESSAGE这个API里面参数可以定义多种类型的数据类型!