是否可以在不设置Console.Title的情况下设置控制台应用程序的窗口标题? [英] Is it possible to set the window title of my console app without setting Console.Title?

查看:64
本文介绍了是否可以在不设置Console.Title的情况下设置控制台应用程序的窗口标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的控制台应用程序首次运行时,我执行 Console.Title ="whatever" 来更改窗口的标题.让我感到烦恼的是,瞬间出现了控制台窗口的标题是EXE本身的路径的情况.我想认为有一种方法可以设置标题,以便将其存储在应用程序设置中,这样就不必使用代码进行设置了.

When my console app first runs, I execute Console.Title = "whatever" to change the window's title. What bugs me is that there is that split second where the console window's title is the path to the EXE itself. I'd like to think that there's a way to set the title so that it's stored in the application settings itself so that I don't have to set it with code.

推荐答案

是否可以像名为"my_console_app.bat"的批处理文件一样运行它?

Perhaps run it as with a batch file called "my_console_app.bat"?

start "My display name" my_console_app.exe

这篇关于是否可以在不设置Console.Title的情况下设置控制台应用程序的窗口标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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