Results 1 to 11 of 11

Thread: Console mode

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    4

    Question

    Right, here goes: I want to write VB programs that behave like QBASIC did. I want to PRINT, and INPUT from the CMD line. I've got the console.bas code, and this is fine, BUT it launches a new console instance. I want to run the program from a CMD line, and have all I/O happen in THAT instance. I'm new to VB, so any help would be appreciated...
    Oh no, not the comfy chair!

  2. #2
    Guest
    You want to run the program from the CMD lines? You mean like when you type Myprog.exe in the DOs prompt and it runs MyProg. Is that what you want to do?

    Please clairify.

  3. #3
    Guest
    To run the the DOS prompt, just use the Shell command.

    Code:
    RetVal = Shell("C:\Command.com", 1)

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    4
    That just starts a new shell... How do I display output (and request input) on the SAME command line?
    Oh no, not the comfy chair!

  5. #5
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Lightbulb Use Start

    Try using the console 'Start' command with the /b option

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    4
    Pardon? I was using the AllocConsole function. This starts a new console window, but all I'm after is the ability to run a program from a CMD window, then display and input in THAT window....
    Oh no, not the comfy chair!

  7. #7
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Question Well, if you've got a console...

    You must be able to send commands to it?? No??
    The 'Start' command can launch a program in its own window.(it actually starts another console, but displays it in the same window).


    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  8. #8
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    Check out the Articles section, a while ago there was an article how to do a console app in VB.
    Hope this helps

    Crazy D

  9. #9
    Guest
    Yes, but i don't think they explained what he is trying to do.

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    what you want is to open stdout as a file...not sure how in VB.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    4

    Thumbs up

    Exactly that...
    Oh no, not the comfy chair!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width