CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Console in VB6

  1. #1

    Console in VB6

    Can you write console-based programs using VB6? I mean, no forms, just stdin and stdout, like in VC++.
    Urps**!

  2. #2
    Join Date
    Aug 2001
    Posts
    1,447
    yes (the C/C++ iostreams aren't there but you can do everything you need to do). They are NOT, strictly speaking, console aps, however since they don't run out of the console window they run out of no window at all (unless you WANT to use a VB form to show progress or other results, in which case they really become just normal VB apps again)

  3. #3
    Join Date
    Apr 2002
    Posts
    65
    how?

    can u give some samples?

  4. #4
    Join Date
    Apr 2000
    Location
    Southampton, UK
    Posts
    329
    You can actually convert your pseudo-console application into a proper console application by editing the executable header. I have some source code that enables this. I will get back to you soon with some examples that will help.
    TimCottee
    I know a little about a lot of things and a lot about very little.

    Brainbench MVP For Visual Basic
    http://www.brainbench.com

    MCP, MCSD, MCDBA, CPIM

  5. #5
    Thanks all, but what I mean is a VB program without forms, just a plain text screen where you can print and input text, just like VC++ WIN32 console applications, MSDOS-ish.

    I thought about setting up an input box and a listbox to make a crappy console with simple input and output.

    Thanx anyway
    Urps**!

  6. #6
    Join Date
    Apr 2002
    Posts
    65
    any samples?
    Thanks~
    hao_han

  7. #7
    This is the best example I could find of a 'console program'... => Just a text screen, text input and output. No forms. Just text.
    Attached Images Attached Images  
    Urps**!

  8. #8
    Join Date
    Apr 2000
    Location
    Southampton, UK
    Posts
    329
    TimCottee
    I know a little about a lot of things and a lot about very little.

    Brainbench MVP For Visual Basic
    http://www.brainbench.com

    MCP, MCSD, MCDBA, CPIM

  9. #9
    Thanx, I'm gonna check the forums.
    BTW, I am trying to make something: I used a label as text output. Now I am managing to get a simple input. I have to wait for keypresses and store the ASCIIs in a variable until user taps ENTER, but I have no clue on how to make it.

    The code I've written.
    Attached Files Attached Files
    Urps**!

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

Featured