|
-
Dec 26th, 2003, 06:47 AM
#1
Thread Starter
Hyperactive Member
shell command in vb 6.0 what in vb.net
dear all,
I want to run an exe from my vb.net windows form what is replacement of shell command(in vb 6.0) in vb.net
help appreciated !!
thanks & regards
ppcc
-
Dec 26th, 2003, 06:51 AM
#2
Sleep mode
Simply this ,
VB Code:
Process.Start("notepad.exe")
-
Dec 26th, 2003, 07:01 PM
#3
Frenzied Member
actually, the "shell" command works too. Is it better to use the process.start?
-
Dec 26th, 2003, 07:23 PM
#4
Sleep mode
Originally posted by thephantom
actually, the "shell" command works too. Is it better to use the process.start?
Ofcourse , what better is , it's using managed code and no damn API .
-
Dec 27th, 2003, 09:47 PM
#5
Hyperactive Member
That code works fine if you are using an application for the filename. If you want to, say, open an excel file, with only the filename of the excel file, then this would be better
Code:
Dim ss As Process
ss.StartInfo.FileName = theExcelFileName
ss.StartInfo.UseShellExecute = True
ss.StartInfo.RedirectStandardOutput = False
ss.Start()
-
Dec 27th, 2003, 10:43 PM
#6
Originally posted by But_Why
That code works fine if you are using an application for the filename. If you want to, say, open an excel file, with only the filename of the excel file, then this would be better
Code:
Dim ss As Process
ss.StartInfo.FileName = theExcelFileName
ss.StartInfo.UseShellExecute = True
ss.StartInfo.RedirectStandardOutput = False
ss.Start()
How would that work better? I can send "business.xls" (I'm not sure of the excel extension, lets pretend it is .xls if I am wrong) to Process.Start() and it opens the file into excel.
-
Dec 27th, 2003, 11:34 PM
#7
yay gay
I think it's goin to lead to the same
\m/  \m/
-
Dec 28th, 2003, 05:22 AM
#8
Sleep mode
Originally posted by But_Why
That code works fine if you are using an application for the filename. If you want to, say, open an excel file, with only the filename of the excel file, then this would be better
Code:
Dim ss As Process
ss.StartInfo.FileName = theExcelFileName
ss.StartInfo.UseShellExecute = True
ss.StartInfo.RedirectStandardOutput = False
ss.Start()
It's the same but longer , better to use the static Process class with only one line of code .
-
Dec 29th, 2003, 12:17 AM
#9
Thread Starter
Hyperactive Member
thanks
thank u genious
regards
ppcc
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
|