MikeHost Posted December 30, 2002 Posted December 30, 2002 In VB you use either Shell or ShellExecute. I can't find the equivalent in .NET. Quote
*Gurus* divil Posted December 30, 2002 *Gurus* Posted December 30, 2002 System.Diagnostics.Process.Start() Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
*Experts* DiverDan Posted January 16, 2003 *Experts* Posted January 16, 2003 This one worked just great for me... If OpenDocument("C:\Winnt\system32\calc.exe") = False Then OpenDocument("C:\Windows\system32\calc.exe") End If End Sub Public Function OpenDocument(ByVal DocName As String) As Boolean Try Start(DocName) Return True Catch Return False End Try End Function:D Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
*Gurus* divil Posted January 16, 2003 *Gurus* Posted January 16, 2003 I don't know exactly what that code is supposed to do, but it isn't very good. To start with, you're hardcoding Windows paths, which is a big no no. Then you seem to be calling some Start function which doesn't actually exist, unless you've imported something I'm not aware of, in which case you need to specify. Bottom line, to anyone reading this, ignore the code posted above and use the Process.Start function. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
*Experts* Nerseus Posted January 16, 2003 *Experts* Posted January 16, 2003 I would guess he just typed it in manually and it should be "Process.Start", assuming a "using" statement for System.Diagnostics. I'm not sure the equivalent word in VB.NET to using, Imports maybe? As for the paths, you can use Environment.SystemDirectory to get the path to c:\winnt\system32 or c:\windows\system32 or wherever it is. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.