DDE using System.Windows.Automation

本文关键字:Automation Windows System using DDE | 更新日期: 2023-09-27 18:02:49

是否可以使用。net System.Windows.Automation命名空间并执行与旧DDE相同的操作?

我的要求是从我的。net Windows Forms应用程序中读取命令窗口(也可以是主机屏幕)内的文本。

我最好使用http://ndde.codeplex.com/为这个目的?

DDE using System.Windows.Automation

作为上述DDE库的作者,我强烈建议您不要使用它。这并不是说它不起作用。原因很简单,DDE本身就很可怕;可能是有史以来最差的进程间通信协议

您应该做的是从控制台窗口重定向标准输出流。这可以通过通过Console.SetOut设置一个新的流来完成。如果终端来自主机,那么使用NetworkStream类从telnet端口读取。

据我所知System.Windows.Automation不支持DDE。

最后一次使用DDE时,我们使用了vb6桥。