passing parameter....

  • Thread starter Thread starter Joe Smith
  • Start date Start date
Joe Smith said:
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""" _
)
///
 
Back
Top