Re: Starting a console application from parameters



"Fabri" <no@xxxxx> schrieb:
I'm writing a Console Application and I would like to start it only if I pass to it a param:

myapp.exe -s --> start
myapp.exe --> I write usage reference

\\\
Public Module Program
Public Function Main(ByVal Args() As String) As Integer
For Each Arg As String In Args
MsgBox(Arg)
Next Arg
Application.Run(New MainForm())
If...Then
Return 0
Else
Return 1
...
End If
End Function
End Module
///

Select 'Sub Main' as startup object in the project properties.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
.



Relevant Pages

  • Re: [SPS2003] Alerts not sent by Email to users
    ... En-têtes de messagerie:: X-AlertTitle = ... Object target, Objectargs, BooleanbyrefModifiers, Int32 culture, ... ParameterModifiermodifiers, CultureInfo culture, String[] ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Read Exchange Emails
    ... not be sent to the SMTP server. ... The transport error code was 0x800ccc15. ... CultureInfo culture, String[] namedParameters) ... String methodName, Objectargs) ...
    (microsoft.public.win32.programmer.messaging)
  • RE: "SendUsing" configuration value is invalid.
    ... Private Sub Page_Init(ByVal sender As System.Object, ... Int32 culture, String[] namedParameters) +0 ... Binder binder, Object target, Objectargs) +29 ...
    (microsoft.public.dotnet.framework.aspnet)
  • "SendUsing" configuration value is invalid.
    ... Private Sub Page_Init(ByVal sender As System.Object, ... Int32 culture, String[] namedParameters) +0 ... Binder binder, Object target, Objectargs) +29 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: =?ISO-8859-1?Q?R=FCckgabewert_einer_Konsolenapplication?=
    ... Public Module Program ... Public Function Main(ByVal Args() As String) As Integer ...
    (microsoft.public.de.german.entwickler.dotnet.vb)

Loading