.Net Console Application that Doesn#39;t Bring up a Console(不启动控制台的 .Net 控制台应用程序)
问题描述
我有一个控制台应用程序,用于通过 Windows 调度程序运行计划作业.与应用程序之间的所有通信都在电子邮件、事件记录、数据库日志中.有什么办法可以抑制控制台窗口出现吗?
I have a console application I'm using to run scheduled jobs through windows scheduler. All the communication to/from the application is in email, event logging, database logs. Is there any way I can suppress the console window from coming up?
推荐答案
当然.将其构建为 winforms 应用程序,从不显示您的表单.
Sure. Build it as a winforms app and never show your form.
请小心,因为它不再是真正的控制台应用程序,并且在某些环境中您将无法使用它.
Just be careful, because then it's not really a console app anymore, and there are some environments where you won't be able to use it.
这篇关于不启动控制台的 .Net 控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:不启动控制台的 .Net 控制台应用程序
基础教程推荐
- C# 9 新特性——record的相关总结 2023-04-03
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 将数据集转换为列表 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 如果条件可以为空 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
