VB控制台应用程序窗口不弹出? [英] VB console app with the window not popping up?

查看:144
本文介绍了VB控制台应用程序窗口不弹出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在控制台上运行的VB .NET 2003应用程序.当应用程序运行时,会弹出控制台窗口,这并不总是必需的.有谁知道一种防止该控制台窗口弹出但仍继续运行的方法?

我正在考虑以下方面的内容:

在< appSettings>在app.config文件的我的电脑"部分,我将拥有一个"ConsoleWindow"设置值为开".或关闭".
在VB代码中,我只有一个简单的if语句.然后
阻止控制台窗口弹出的代码
结束如果

我不确定是否可以控制显示/隐藏控制台窗口的功能.

I have a VB .NET 2003 application that runs on the console.  When the application runs, the console window pops up which isn't always necessary.  Does anyone know of a way to prevent that console window from popping up, but still continue to run? 

I was thinking of something along these lines:

In the <appSettings> section of the app.config file I would have an "ConsoleWindow" setting with a value of "On" or "Off."
In the VB code I would just have a simple if statement.

If ConsoleWindow = "Off" Then
   'Code that prevents the console window from popping up
End If

I'm just not sure what controls the ability to show/hide the console window.  Any help would be greatly appreciated.

推荐答案

我不理解您的问题,如果您创建了控制台应用程序,则您的程序应在控制台上运行,您为什么要禁用它?除非您在控制台应用程序之上创建Windows窗体应用程序. [这是我的猜测].如果您将代码发布在这里,这样我们可以理解该问题,那就太好了.
kaymaf

i dont understand your question, if you created console application,your program should run on console, why do you want to disable it ? unless you create windows form application on top of console aplication. [That is my guess] . It will be nice if you post your code here so that we can understand the issue.
kaymaf


这篇关于VB控制台应用程序窗口不弹出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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