Solved

write to command line

Posted on 2003-11-11
8
284 Views
Last Modified: 2010-08-05
I am writing an application that runs from a command prompt. I would like to write to the command line instead of using msgbox.
0
Comment
Question by:mittel
8 Comments
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 9726192
This can and cannot be done depending on how you want to look at it.

Yes...it is possible to create a VB App that uses a console window for input/output.  HOWEVER, the VB app creates its own console window to achieve this.  Here are two links on the topic:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q171/6/54.asp&NoWebContent=1

http://internettrash.com/users/fdb/cons.htm

I could not find one example of a VB App sending output to the console window that it was executed from.

One sloppy possiblity that will definitely not be foolproof:

Use the FindWindow API to get a handle to the command window.  Put the message you want in the clipboard.  Activate the command window.  Use send keys to Edit --> Paste your message into the command window.

Any Experts want to implement that? =)

Idle_Mind
0
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9727118
Questioner:
Can I ask what is the intention you implement this method?

~ fantasy ~
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 9872474
What did you decide to do Mittel?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:mittel
ID: 9896203
To fantasy: I wanted to write an application like that using C where you can write back to the command window.

To idle mind: Although your solutions sounded very promising, I ended up just writing to a log file.

mittel
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 10165508
I recommend the question be closed points refunded.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10537240
mittel, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

Dan Rollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 10578206
PAQed, with points refunded (125)

ee_ai_construct
Community Support Moderator
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

856 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