Winform应用程序在控制台中写入其消息 [英] Winform application to write its messages in console

查看:102
本文介绍了Winform应用程序在控制台中写入其消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里有两个提案..我有一个运行的Windows应用程序。第一个建议是我应该将消息直接写入控制台(命令提示符),即使它不是控制台应用程序。



第二个选项是我应该创建一个控制台应用程序,在其中应该读取Windows应用程序生成的日志文件并将其写入控制台。请注意,Windows应用程序将在运行时实时更新日志文件,我希望控制台应用程序在下一刻自己读取日志中的每条更新消息。这有可能吗?



哪个可行?以及如何实现这一目标?



我们非常感谢快速回复..谢谢......

I am here with 2 proposals.. I have a windows application running. First proposal is that I should have the messages written directly to a console(command prompt),even though it is not a console application.

Second option is that I should create a console application in which it should read the log file produced by the windows application and write the same to the console. Please note the windows application will be updating the log file in real time while it is running and I want the console app to read each and every updated messages in log at the very next moment itself..Is it possible??

Which will be feasible?? and how I can achieve that?

Fast responses are really appreciated.. Thanks...

推荐答案

查看关于应用程序日志记录的MSDN文档 [ ^ ]。示例是在VB中,但它应该指向至少一个可行解决方案的方向
Have a look at the MSDN documentation on Application Logging[^]. The example is in VB but it should point you in the direction of at least one feasible solution


这篇关于Winform应用程序在控制台中写入其消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆