Sending Information to DOS

I have an NT machine that has a dos application that runs in a dos box. I need to know if there is a way that I can have a vb project take infomation that is keyed into it and send it to the DOS based program?

Comments

  • How do u want the DOS app to take the info? like this: format <--(DOS app) c: /fs:ntfs <--(user input from VB)
    Or do u want the VB data to go to the DOS app when the DOS app is actually running?
  • : How do u want the DOS app to take the info? like this: format <--(DOS app) c: /fs:ntfs <--(user input from VB)
    : Or do u want the VB data to go to the DOS app when the DOS app is actually running?
    :

    I want the VB app to actually go to the DOS app and imput the information.
  • : : How do u want the DOS app to take the info? like this: format <--(DOS app) c: /fs:ntfs <--(user input from VB)
    : : Or do u want the VB data to go to the DOS app when the DOS app is actually running?
    : :
    :
    : I want the VB app to actually go to the DOS app and imput the information.
    :

    You're talking about IPC, inter-process communication, which as far as I know is only possible using sockets or pipes, or similar constructs. Way beyond my current ability. Good luck.
  • : : : How do u want the DOS app to take the info? like this: format <--(DOS app) c: /fs:ntfs <--(user input from VB)
    : : : Or do u want the VB data to go to the DOS app when the DOS app is actually running?
    : : :
    : :
    : : I want the VB app to actually go to the DOS app and imput the information.
    : :
    :
    : You're talking about IPC, inter-process communication, which as far as I know is only possible using sockets or pipes, or similar constructs. Way beyond my current ability. Good luck.
    :

    Does anyone know where I can get information on IPC?

  • : Does anyone know where I can get information on IPC?

    Just search for programming sockets or pipes in VB.

    By the way, is the DOS program one that you wrote or are you trying to control someone else's program with your VB program? If that's the case then sockets and pipes won't do you any good because you have to program them on both ends.
  • : : Does anyone know where I can get information on IPC?
    :
    : Just search for programming sockets or pipes in VB.
    :
    : By the way, is the DOS program one that you wrote or are you trying to control someone else's program with your VB program? If that's the case then sockets and pipes won't do you any good because you have to program them on both ends.
    :

    Or, depending on the program, this might work:
    [code]
    Clipboard.Clear
    Clipboard.SetText "Text to be sent"
    'Ensure focus is on DOS window and then:
    SendKeys "% ", True
    SendKeys "ep", True
    [/code]
    A bit of a hack, I suppose, but it uses a DOS window's paste feature to give it text from the clipboard.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories