*
(E-Mail Removed)lid (Justine) scripsit:
> Can anyone help?
> e.g. when you open a vb project property page, in "Configuration
> Properties"
> You will see "Command line arguments" in "Start Options". Does anyone
> knows how to find a way to do arguments passing. Thank you.
You can enter arguments there. When starting the application outside
the IDE, you can use a shortcut or the console to pass arguments.
This code shows you how to get the passed data:
\\\
Public Sub Main(ByVal astrCmdLineArgs() As String)
Dim i As Integer
For i = 0 To astrCmdLineArgs.Length - 1
Console.WriteLine(astrCmdLineArgs(i))
Next i
End Sub
///
- or -
\\\
Public Sub Main()
Dim i As Integer
For i = 0 To Environment.GetCommandLineArgs().Length - 1
Console.WriteLine(Environment.GetCommandLineArgs(i))
Next i
End Sub
///
Notice that the startup object must be set to 'Sub Main'.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>