By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,088 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Shell Execute

P: n/a
What would be the equivalent in vb.net for the following Shell Execute
written in C?

ShellExecute(NULL, "print", "c:\\filename.doc", NULL, "", SW_HIDE);

Thanks,

Richard

Nov 20 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Nak
> What would be the equivalent in vb.net for the following Shell Execute
written in C?


Hi there,

This is a VB.NET newsgroup, you might want to try a C newsgroup.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #2

P: n/a
"Nak" <a@a.com> schrieb:
What would be the equivalent in vb.net for the following Shell Execute
written in C?


This is a VB.NET newsgroup, you might want to try a C newsgroup.


I think he wants an equivalent in VB.NET...

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

P: n/a
"Nak" <a@a.com> schrieb
What would be the equivalent in vb.net for the following Shell
Execute written in C?


Hi there,

This is a VB.NET newsgroup, you might want to try a C
newsgroup.


He is asking for a VB.NET solution. :)
--
Armin

Nov 20 '05 #4

P: n/a
Cor
So give that, I don't want to disturb the small line I have now with Nick
Nov 20 '05 #5

P: n/a
"Richard Grene" <rg****@s4si.com> schrieb:
What would be the equivalent in vb.net for the following Shell Execute
written in C?

ShellExecute(NULL, "print", "c:\\filename.doc", NULL, "", SW_HIDE);


Untested:

\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.Verb = "print"
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\filename.doc"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #6

P: n/a
"Cor" <no*@non.com> schrieb:
So give that, I don't want to disturb the small line I have
now with Nick


I have posted a reply to the original question containing a solution.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #7

P: n/a
Nak
Woops, sorry I misread. :-)

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #8

P: n/a
Nak
Woops, sorry I misread.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #9

P: n/a

I tried this code and got the error:

system.runtime.InteropServices.ComException

The RPCX Server is unavailable

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.