469,270 Members | 1,737 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

passing parameter....

How to pass parameter to a Vb.Net application?
..Net Framework 1.1.
Thanks,
Joe
Nov 21 '05 #1
1 1275
"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/>

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by wiredless | last post: by
11 posts views Thread by John Pass | last post: by
2 posts views Thread by diffuser78 | last post: by
reply views Thread by amazon | last post: by
12 posts views Thread by dave_dp | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.