I am not really new to vb6 i have messed around with it for a while but i been wondering how i could make like a command prompt type program?
Printable View
I am not really new to vb6 i have messed around with it for a while but i been wondering how i could make like a command prompt type program?
VB6 was never meant to support writing console programs, but as in so many other areas it is possible to extend it that way using a few tricks.
One heavyweight way to do this is written up at MConsole. Despite Karl's claims that it is lightweight it contains way more than is required (how many console programs really need to flash the console window title bar?). It is very complete though, and might be a good way to begin.
thank you ill look at that but i been thinking and i believe this isn't really what i was thinking lol sorry but heres what i really want to do..
alright we all know about making like quizes in batch files right?
well i want to make a game in vb that will be kinda like a batch file but more stuff to add then batch files can allow me but still in a batch file style if you understand what i mean.. i just need to be put on the right track of doing something like this im not sure how to start it up and display like a batch file
One easy way to run DOS commands is...
http://www.vbforums.com/showpost.php...24&postcount=6
Another is to simply shell out your batch file like in the above example except instead of the DOS commands you place the file path to your batch file.
A batch file is nothing more then a text file with the DOS commands in it.Code:ShellExecute Me.hwnd, "Open", "C:\Windows\System32\CMD.exe", "C:\myBatchFile.bat", "C:\", SW_SHOWNORMAL
Sample:
Code:Dir C:\ > C:\Dir.txt
Taking a wild guess, it sounds like you were talking about BAT files made up of a list of ECHO and PROMPT commands with an IF here and there to make some sort of quiz.
It should be easy enough to write a program accepting some sort of specialized "quiz script" file of questions, answers, and conditional actions.
There was an old, old language named Pilot for this sort of thing. You might hunt for that or write a clone of some sort.
Or you might just write a VB6 program using the Windows Script Control to load and run scripts in VBScript or JScript. By making your own script host this way you can extend the standard scripting languages with simple to use commands or bells and whistles like grpahical actions and sound effects.