大家好,对c#不熟悉,我向开发一个功能是
截取一个exe文件执行时发给windows的消息,请问c#适合开发这样的程序嘛?
如果不合适,哪中开发语言合适???

解决方案 »

  1.   

    可以。重载WndProc方法即可。
    protected override WndProc(ref Message m)
    {
          if ( m.Message == 你要处理的消息)
          {
          }
          else
          {
                base.WndProc(m);
          }
    }
      

  2.   

    可以用Winform接收到消息, 可是要给Windows发送一个消息,就要用API了.
    觉得楼主考虑用MFC来做.
      

  3.   

    可以的
    可以直接发送
    [DllImport("User32.dll",EntryPoint="FindWindow")]
    public static extern IntPtr FindWindow(string lpClassName,string lpWindowName);
    [DllImport("user32.dll",EntryPoint="FindWindowEx")]
    public static extern IntPtr FindWindowEx(IntPtr hwndParent,IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
      

  4.   

    截取一个exe文件执行时发给windows的消息
    是hook技术
    这个什么语言写都一样拉
    SetHookEx
      

  5.   

    Platform Invoke.我就用过它实现了获得windows窗口并触发和接受窗口消息。楼主可以google一下。如果要求不高直接用c#的Form的各种事件也够了