|
-
Oct 27th, 2009, 11:17 PM
#1
Thread Starter
New Member
vb6 command prompt
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?
-
Oct 27th, 2009, 11:25 PM
#2
Re: vb6 command prompt
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.
-
Oct 27th, 2009, 11:38 PM
#3
Thread Starter
New Member
Re: vb6 command prompt
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
-
Oct 28th, 2009, 01:53 AM
#4
Re: vb6 command prompt
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.
Code:
ShellExecute Me.hwnd, "Open", "C:\Windows\System32\CMD.exe", "C:\myBatchFile.bat", "C:\", SW_SHOWNORMAL
A batch file is nothing more then a text file with the DOS commands in it.
Sample:
Code:
Dir C:\ > C:\Dir.txt
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 28th, 2009, 03:07 PM
#5
Re: vb6 command prompt
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.
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
|