"Joe Smith" <Jo*********@hotmail.com> schrieb:
How to pass parameter to a Vb.Net application?
Add this code to a module file and select 'Sub Main' as startup object in
the project properties:
\\\
Public Module Program
Public Function Main(ByVal Args() As String) As Integer
For Each Arg As String In Args
Console.WriteLine(Arg)
Next Arg
End Function
End Module
///
Starting an application and passing parameter to the started application:
\\\
Imports System.Diagnostics
..
..
..
Process.Start( _
"mysearch.exe", _
"""searchthis string"" ""inthisfile.txt""" _
)
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>