|
-
Jun 27th, 2002, 09:22 AM
#1
Thread Starter
Lively Member
old school -- command line executable
I'm creating a good "old fashioned" command line program: no forms, no visual interface. Just a bunch of modules and a sub main(). Reads command line options.
Now my problem: I can't seem to find any way to return text to the console (command line interface). I want to return status information, but I can't find any functionality to do this. Basically I'm looking for the equivalent of a printf or cout...is this possible?
-
Jun 27th, 2002, 09:32 AM
#2
Frenzied Member
have you heard of qbasic? lol... no but seriously, that's probably the easiest way to go unlress there's lots of apis, if there is lots of apis then thats good you know how to use them because i takes a whole bunch to make a console app in vb. i know i've seen this tutorial somewhere, i'm lookin...
-
Jun 27th, 2002, 09:34 AM
#3
Frenzied Member
-
Jun 27th, 2002, 09:46 AM
#4
Thread Starter
Lively Member
thx for the quick reply. I *do* miss qbasic...esp the worm game. I *really* miss my unix days...writing code in vi, command line c compiler...good old days.
I figured there might not be an easy way to do this...oh well. Price of progress.
-
Jun 27th, 2002, 10:25 AM
#5
Black Cat
Re: old school -- command line executable
Originally posted by DaveAMS
I'm creating a good "old fashioned" command line program: no forms, no visual interface. Just a bunch of modules and a sub main(). Reads command line options.
Now my problem: I can't seem to find any way to return text to the console (command line interface). I want to return status information, but I can't find any functionality to do this. Basically I'm looking for the equivalent of a printf or cout...is this possible?
If you're app is written in VB6 (or earlier, probably), and it is run from the command prompt (cmd.exe), you need to binary patch your compiled executable with a utility called mkconsole.exe to get your standard output to go back to cmd.exe - use the APIs GetStdHandle and WriteFile.
The mkconsole tool and source code are on this site - kinda hidden, look for console stuff.
http://mvps.org/st-software/
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Aug 1st, 2002, 05:49 PM
#6
Frenzied Member
Can someone just write a little module with a sub and a function?
The sub being print to commandline, and the function being read
the commandline.
-
Aug 1st, 2002, 05:55 PM
#7
The picture isn't missing
wouldn't it be easier to just write C console instead...
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Aug 1st, 2002, 06:11 PM
#8
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|