Shell Execute

  • Thread starter Thread starter Richard Grene
  • Start date Start date
R

Richard Grene

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
 
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
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
Richard Grene said:
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)
///
 
Cor said:
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.
 
Woops, sorry I misread.

Nick.

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

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
Woops, sorry I misread. :-)

Nick.

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

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
I tried this code and got the error:

system.runtime.InteropServices.ComException

The RPCX Server is unavailable
 
Back
Top