Howdy, Stranger!

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

Categories

Sending Information to DOS

UPSGeekUPSGeek Member Posts: 32
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

  • NavicNavic Member Posts: 109
    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?
  • UPSGeekUPSGeek Member Posts: 32
    : 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.
  • infidelinfidel Member Posts: 2,900
    : : 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.
  • UPSGeekUPSGeek Member Posts: 32
    : : : 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?

  • infidelinfidel Member Posts: 2,900
    : 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.
  • KDivad LeahcimKDivad Leahcim Member Posts: 3,948
    : : 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.
  • Shawn CarterShawn Carter Member Posts: 0

    ___ < http://forcoder.org /> free video tutorials and ebooks about [ Visual Basic Swift R Assembly Ruby Go JavaScript Java Python Scratch Delphi C PL/SQL PHP C# Objective-C C++ Visual Basic .NET MATLAB Perl Crystal Julia Awk COBOL Dart Alice Clojure Scala VBScript Prolog Apex Rust FoxPro ML SAS Scheme Lisp LabVIEW Lua Bash ABAP F# Transact-SQL Logo Erlang Fortran Ada Hack Kotlin D ] _____________

Sign In or Register to comment.