Solved

write to command line

Posted on 2003-11-11
8
294 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
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!

 

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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
using web browser with BING 40 135
Visual Studio 2005 text editor 10 47
How to make an ADE file by code? 11 99
VB6 ListBox Question 4 55
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

680 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