Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Text to a command window

Posted on 2000-04-18
4
Medium Priority
?
147 Views
Last Modified: 2010-05-02
I want to write a command line app in VB.  Basically you call the app with parameters from a dos window.  The problem I have is reporting errors directly back to the dos window.
How can I do this with VB?
0
Comment
Question by:rokslide
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:Ask_ED
ID: 2729518
Hi

I believe you are describing what is called a console program.

For a working example try:
Writing Console-Mode Applications in Visual Basic

http://www.vb-world.net/api/console/index3.html

Hope this helps
ED
0
 
LVL 1

Accepted Solution

by:
Ask_ED earned 300 total points
ID: 2729522
Hi Again,

If the console app is "more" than you were looking for ..

To return a DOS error code try the ExitProcess API that can be trapping in a btach file.

For an example try:
http://www.vb2themax.com/Item.asp?PageID=TipBank&ID=50 

VB2theMAX also has other great tips...

Hope this helps
ED

0
 
LVL 43

Expert Comment

by:TimCottee
ID: 2734157
rokslide:

Ask_Ed's link is worthwile looking into, also you could look at:

Sample console app:

http://www.saurik.com/ Goto Samples, smpConsole

All the examples given so far don't address the key problem which is how to actually get the application to run in the command window in which it was started. The link

PAQ: http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=10324610 

shows how it is possible to create a console application such as the smpConsole one from Saurik which will actually run in the original command window.

0
 

Author Comment

by:rokslide
ID: 2753380
Okie, the examples there don't actually do what I was wanting but, delving under he covers abit into some of the background info and follow up questions does so I'm happy. :)  Now all I have to do is find the time to actually understand it all. ;)

Thanks. :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question