Click to See Complete Forum and Search --> : How can i start a program from VB?
DrBoz
Jan 28th, 2000, 12:14 AM
I have a button, (Command1) and i want to start notpad, by clicking this button.
But I don't want to use, the command: shell
So how can i start notepad without using MSDOS, or any other program by clicking this button ? Thanx
QWERTY
Jan 28th, 2000, 12:21 AM
Wanna use API? (http://www.vbapi.com/ref/s/shellexecute.html)
By the way, why don't you want to use Shell?
HTH
------------------
Visual Basic Programmer
------------------
PolComSoft
You will hear a lot about it.
DrBoz
Jan 28th, 2000, 12:24 AM
well, i dont want to use shell cause, thay disabled MS DOS at my school, and i want to use this VB project at school.
gamefiend
Jan 28th, 2000, 12:40 AM
There is actually a good project at http://visualbasic.about.com where you build a text editor in vb... complete with load and save functions, cut, paste, copy, etc...
Check it out:
http://visualbasic.about.com
chrisjk
Jan 28th, 2000, 02:48 AM
I must be missing something...what has Shell got to do with DOS?
DrBoz
Jan 28th, 2000, 06:35 AM
whell when u use shell, it opens up a dos box, and thats the problem
chrisjk
Jan 28th, 2000, 06:57 AM
Err...are you sure? I've never encountered a DOS box. What does the DOS box say (if anything)? Does the program you shelled still execute?
Of course this could happen on versions other than 6 (the only one i know :))
QWERTY
Jan 28th, 2000, 09:00 AM
I don't think Shell has anything to do with DOS either.
------------------
Visual Basic Programmer
------------------
PolComSoft
You will hear a lot about it.
DrBoz
Jan 28th, 2000, 05:05 PM
can u give me an example using the shell command ?
DrBoz
Jan 28th, 2000, 05:08 PM
never mind, i already got it:
Call Shell("c:\windows\notepad.exe", vbNormalFocus)
thanx.
rino_2
Jan 29th, 2000, 11:49 AM
Shell only opens up a dos dialog box if you're opening a dos program with the shell command.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.