Development Visual Basic front end for a command line program?

Discussion in 'Software' started by Guest-2808, 26 Jul 2004.

  1. Guest-2808

    Guest-2808 Guest

    I want to write a little VB program to act as a front end to a command line program (namely the par2 program for creating parity data). I can't seem to find any information at all on doing this, however.

    Of course, you can just use the SHELL command to execute a CLI program, but you cannot read back any output from it that way. What I want is to execute the program and be able to read back what it outputs in real-time, so for example I could display a progress bar based on the % done it prints.

    I could do this in C, but I figured I'd give VB a go since I had to learn it at uni and it is a very fast way to develop apps. I'm surprised there is no info...
     
  2. Hepath

    Hepath Minimodder

    Joined:
    20 Oct 2003
    Posts:
    730
    Likes Received:
    0
    Not having written a app that "shelled" out for ages - tell me how you'd go about it in C... I've never had to trap the output, just the return codes (ERRORLEVEL, etc)

    I can convert if I get the general gist of how you'd trap it in C

    Stu
     
  3. Guest-2808

    Guest-2808 Guest

    In C, you basically follow this article:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;190351

    It could be converted to VB, but in that case I might as well just use C so I was wondering if there was an easy way to do it in VB.

    VB is a very odd language. As far as it goes, it is easy and quick to work with. There seem to be some gaping holes though, like the fact that it doesn't have built in features for making resizeable GUIs. Oh well...
     
  4. Moddern

    Moddern Minimodder

    Joined:
    30 Mar 2004
    Posts:
    187
    Likes Received:
    2
    Why at all bother with VB? This I have never come to terms with..............
     
    Last edited: 28 Jul 2004
  5. [cibyr]

    [cibyr] Sometimes posts here

    Joined:
    30 Nov 2003
    Posts:
    749
    Likes Received:
    1
    VB is a (the?) noob's language. While it is used by many for teaching kids about programming, like you said its full of gaping holes and it will teach you some bad habits. My advice is just to stay away from VB as much as possible.
     
  6. Guest-2808

    Guest-2808 Guest

  7. Hepath

    Hepath Minimodder

    Joined:
    20 Oct 2003
    Posts:
    730
    Likes Received:
    0
    Not wishing to degenerate this thread into a VB flame war.. I have one thing to say - sheer speed of development!

    There is no doubt developing standard applications in VB is quicker and easier in VB. The language is intuitive to beginners yet allows those with an enquiring mind to digress in to other things; for example the vagries of the Win32 API.

    In terms of it weaknesses? I can think of many, but all related to 'enterprise' size apps. Its obscurement of COM interfaces, its early binding faux pas', as well as it verbosity....

    Too each their own; for each job the right tool.

    I think it was summed up in a previous thread.... use VB for developing a program quickly; another language for a developing a quick program.

    (Dang I like that!)
     

Share This Page