Arne
Tue Apr 26 13:52:01 CDT 2005
Herfried,
I thought I would return 0 on success.
Actually my program starts from
static void Main()
{
}
so I can't return anything the OS.
I have tried Application.Exit() and that seems to work.
Arne.
"Herfried K. Wagner [MVP]" wrote:
> "Arne" <Arne@discussions.microsoft.com> schrieb:
> > When the program has terminated, scheduler thinks
> > it is still running! Is there a way I can use an exit code that the
> > Scheduler
> > can pick up?
>
> Add a new module to the project:
>
> \\\
> 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 1
> Else
> Return 2
> ...
> 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/>
>
>