Results 1 to 13 of 13

Thread: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    125

    How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    How to call dos-mode programs into window mode? or put them in form? anyone pls. help

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    Welcome to teh VBForums!

    What do you mean be "call in to window mode" ? A DOS program is text-only, if it had a window it wouldn't be a DOS program

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    125

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    oh sorry, i meant "how to call dos programs?"

    would it be possible for these programs to be inside a form? or anything?
    like for example : turbo pascal inside a form?

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    you can shell a dos program, which will run in it's own dos window

    Dim RetVal
    RetVal = Shell("C:\WINDOWS\CALC.EXE", 1)

    this can be used to call a dos program, or even a dos batch file

    pete

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    No you can't put a command prompt (DOS app) within a form.

  6. #6
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls.

    Quote Originally Posted by westconn1
    you can shell a dos program, which will run in it's own dos window

    Dim RetVal
    RetVal = Shell("C:\WINDOWS\CALC.EXE", 1)

    this can be used to call a dos program, or even a dos batch file

    pete

    Or, use the ShellExecute API if you need to use parameters, Shell() does not like them very much

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  7. #7
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    i suppose if you have a textbox on a form you could use it like a dos prompt

    retval = shell ( text1.text)

    pete

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    125

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    Quote Originally Posted by penagate
    No you can't put a command prompt (DOS app) within a form.
    but would it be possible to create a VB-coded program to call these DOS applications?

  9. #9
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    yes but if you want to get a return value from the dos program it is a bit more difficult, one way is to rediect the output ot the dos program to a text file, then read the file back into vb

    pete

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    125

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    Quote Originally Posted by westconn1
    yes but if you want to get a return value from the dos program it is a bit more difficult, one way is to rediect the output ot the dos program to a text file, then read the file back into vb

    pete
    wow! that's alot of work to do. hehehe

    btw! thank you for the help.

  11. #11
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    i guess it depends what you want to do and why you need to use a dos program to do it

    pete

  12. #12

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    125

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    Quote Originally Posted by westconn1
    i suppose if you have a textbox on a form you could use it like a dos prompt

    retval = shell ( text1.text)

    pete
    on this code, what's the relation with one you first mention?

    sorry! i'm just a newbie.

  13. #13
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help

    you could type the dos commandline into a textbox, then on button click or whatever shell or shellexecuteex the string enterered in the textbox, as mentioned before shell doesn't like parameters or command line arguments

    sort of like the windows run box

    why do you need to use dos program?

    pete

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