Hi,
i would like to invoke another applcation in my program.I 've tried
shellexecute ,but it doesnt work .
here is my code :
ShellExecute(0, "open", "C:\windows\system32\notepad.exe", vbNull, vbNull,
SW_SHOWMAXIMIZED)
what amendment should i make in order to make it work ?
thanks very much. 5 2321
Dim P as new System.Diagnostics.Process()
P.Start("Notepad.exe")
"The8thSense" <th*********@yahoo.com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl... Hi,
i would like to invoke another applcation in my program.I 've tried shellexecute ,but it doesnt work .
here is my code : ShellExecute(0, "open", "C:\windows\system32\notepad.exe", vbNull, vbNull, SW_SHOWMAXIMIZED)
what amendment should i make in order to make it work ?
thanks very much.
* The8thSense schrieb: i would like to invoke another applcation in my program.I 've tried shellexecute ,but it doesnt work .
here is my code : ShellExecute(0, "open", "C:\windows\system32\notepad.exe", vbNull, vbNull, SW_SHOWMAXIMIZED)
what amendment should i make in order to make it work ?
Use 'System.Diagnostics.Process.Start' instead and have a look at the
'ProcessStartInfo' class.
--
Herfried K. Wagner
Microsoft MVP
<http://www.mvps.org/dotnet>
thx very much ~
"The8thSense" <th*********@yahoo.com> ¦b¶l¥ó
news:e3**************@TK2MSFTNGP09.phx.gbl ¤¤¼¶¼g... Hi,
i would like to invoke another applcation in my program.I 've tried shellexecute ,but it doesnt work .
here is my code : ShellExecute(0, "open", "C:\windows\system32\notepad.exe", vbNull, vbNull, SW_SHOWMAXIMIZED)
what amendment should i make in order to make it work ?
thanks very much.
"Nice Chap" <Ni******@PlasmaDyne.com> schrieb Dim P as new System.Diagnostics.Process() P.Start("Notepad.exe")
It works, but don't expect p to point to the Notepad process because the
Start method is shared.
--
Armin
In article <e3**************@TK2MSFTNGP09.phx.gbl>, The8thSense wrote: Hi,
i would like to invoke another applcation in my program.I 've tried shellexecute ,but it doesnt work .
here is my code : ShellExecute(0, "open", "C:\windows\system32\notepad.exe", vbNull, vbNull, SW_SHOWMAXIMIZED)
what amendment should i make in order to make it work ?
thanks very much.
Imports System.Diagnostics
....
Dim p As New Process()
With p.StartInfo
.File = "Notepad.exe"
.WindowStyle = ProcessWindowStyle.Maximized
End Wit
p.Start()
Or, if it is a document and you want to open the default handler...
Dim p As New Process()
With p.StartInfo
.File = "myfile.txt"
.Verb = "open"
.WindowSytle = ProcessWindowStyle.Maximized
.UseShellExecute = True ' this is the default anyway
End With
p.Start()
HTH...
--
Tom Shelton
MVP (Visual Basic) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Marcel Sammut |
last post by:
Greetings,
I am converting a VB6 application to .net and am having troubles trying to
print a document directley to the printer. My VB6 app used the API
ShellExecute method to accomplish this,...
|
by: John |
last post by:
All:
Is there a way to issue a ShellExecute function in such a way that it
doesn't first draw a DOS window on the screen?
Here is the command line:
ShellExecute( NULL, "open",...
|
by: Wiktor Zychla |
last post by:
I have a problem I cannot solve.
My application hosts IE activex control. I follow the standard procedure: I
just aximp shdocvw.dll. Note that this gives you two files: axshdocvw.dll
and...
|
by: MCzajk |
last post by:
Is there a function similar to ShellExecute, which I can hook to when the
program is started using Start Menu icon?
MCzajk
|
by: Le, Thanh-Nhan |
last post by:
Hi,
Is there a same function in .Net as API shellexecute?
Thanks
Nhan
|
by: the_openFace |
last post by:
I'm trying to display the shell's property page for various files and I'm
using this code:
class Win32Shell {
// ... other stuff here
public static extern Int32 ShellExecute(
Int32 hwnd,...
|
by: the openBack |
last post by:
I'm trying to display the shell's property page for various files and I'm
using this code:
class Win32Shell {
// ... other stuff here
public static extern Int32 ShellExecute(
Int32 hwnd,...
|
by: David |
last post by:
We have an mfc application in which we use ShellExecute
to launch the browser with an initial web site.
{ShellExecute(
NULL, "open", "http://www.SomeWebSite.com", NULL, NULL,
SW_SHOWNORMAL ) } ...
|
by: John Smith |
last post by:
Hi,
I have an access database form with an image. I'm trying to create an
onclick event on the image so that when a user clicks on the image it opens
that file with the default viewer the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |