如何构建 VB6 控制台应用程序 [英] How do I build a VB6 Console App
问题描述
我做了一些谷歌搜索试图回答这个问题,但即使在那之后我也不太清楚.是否可以从 VB6 创建控制台应用程序?
I did some googling to try to answer this question but even after that I'm not quite clear about something. Is it possible to create a console app from VB6?
我有一个没有窗口的 VB6 应用程序.我一直认为它是一个控制台应用程序.但是,我希望能够在其中使用 Windows API SetConsoleCtrlHandler 函数.我相信对于 C++/MFC 应用程序,您必须设置链接器开关才能创建控制台应用程序.我的一位开发人员告诉我,VB6 不能创建真正的控制台应用程序,因此这行不通.那么是否有可能创建一个 Windows 将识别为来自 VB6 的控制台应用程序的控制台应用程序?
I've got a VB6 app that doesn't put up a window. I always assumed that it was a console app. However, I want to be able to use the Windows API SetConsoleCtrlHandler function from within it. I believe that with C++/MFC apps you have to set a linker switch to create a console app. And one of my fellow developers told me that VB6 doesn't create a true console app and therefore this would not work. So is it possible to create a console app that Windows will recognize as a console app from VB6?
平台:Windows XP SP2
Platform: Windows XP SP2
开发平台:VB6
推荐答案
是的.也可以创建完全无头的应用程序(我过去做过几次).此链接提供了一个带有代码片段的示例.
Yes. It's also possible to create totally headless applications (which I've done a few times in the past). This link gives an example with a code snippet.
这篇关于如何构建 VB6 控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!