|
-
Jun 11th, 2005, 06:25 AM
#1
Thread Starter
Lively Member
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
-
Jun 11th, 2005, 06:38 AM
#2
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
-
Jun 11th, 2005, 07:34 AM
#3
Thread Starter
Lively Member
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?
-
Jun 11th, 2005, 07:39 AM
#4
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
-
Jun 11th, 2005, 07:54 AM
#5
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.
-
Jun 11th, 2005, 07:56 AM
#6
Re: How to call dos-mode programs into window mode? or put them in form? anyone pls.
 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
-
Jun 11th, 2005, 08:16 AM
#7
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
-
Jun 11th, 2005, 08:33 AM
#8
Thread Starter
Lively Member
Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help
 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?
-
Jun 11th, 2005, 08:37 AM
#9
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
-
Jun 11th, 2005, 09:06 AM
#10
Thread Starter
Lively Member
Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help
 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.
-
Jun 11th, 2005, 09:09 AM
#11
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
-
Jun 11th, 2005, 09:51 AM
#12
Thread Starter
Lively Member
Re: How to call dos-mode programs into window mode? or put them in form? anyone pls. help
 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.
-
Jun 11th, 2005, 10:08 AM
#13
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|