Solved

write to command line

Posted on 2003-11-11
8
251 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

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…
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…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now