passing parameter....

H

Herfried K. Wagner [MVP]

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""" _
)
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top