473,396 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Shell Execute

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
9 23453
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
"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
"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
Cor
So give that, I don't want to disturb the small line I have now with Nick
Nov 20 '05 #5
"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
"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
Nak
Woops, sorry I misread. :-)

Nick.

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

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #8
Nak
Woops, sorry I misread.

Nick.

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

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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: axxegfx | last post by:
have a big problem with this thread, after a long time iterations i get an error message about few system resources Public Function Count1(ByVal iterations As Long) As Long Dim objInfoProc As New...
1
by: Bob | last post by:
I have a query whose results contain the full path (i.e. c:\Images\xxx.tif) to MUTI-PAGE (All two page) TIF documents. I need to figure out how to BATCH print the tiff's using the path from the...
1
by: Michael D. Ober | last post by:
Is there a .NET interface to the ShellExecute API, or do I need to continue to call the API directly for this feature? It's an easy way for our software to open archived documents for our users. ...
4
by: nadz | last post by:
hey guys, I know bit of C++. I have installed Microsoft Visual C++ 2005 express. First of all tell me if it is of any use ? My other question is that I am trying to execute this command...
4
by: Zorpiedoman | last post by:
dim FileName as string = "Test.doc" dim P as Process = Process.Start(FileName) '--P is NOTHING even though document opens!!! dim Q as new process Q.StartInfo.FileName = FileName P = Q.start...
2
by: Stwange | last post by:
Can anyone tell me where I can find a list of error codes returned from ShellExecute? I keep getting Error 42 when I try and open a particular file, but I've no idea what this means. Thanks.
3
by: Waldy | last post by:
Hi there, why can't I open a browser window with a URl using ShellExecute? I have tried every combination of File, Parameters and Operation but it never works. You can enter the following: ...
3
by: Max Vit | last post by:
I have come across a strange issue whilst trying to use a shell command call from Access and have spent some time trying to figure this out but can't find the cause as yet. The issue is: I need...
4
by: coetzer | last post by:
Help please I am trying to execute a shell.exe which requires a command for usage in VB.Net so the shell is in folder "tmp" c:\tmp> shell.exe and then the command follows: c:\tmp> shell.exe...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.