|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Exiting app with a codeHi
I have a vb.net app which used SUB Main. How can I at the end of SUB Main exit with an exit code picked up by the app that is calling my vb.net app exe? Many Thanks Regards On 2009-06-10, John <info@nospam.infovis.co.uk> wrote:
> Hi Change your Sub Main to Function Main, and then return a value:> > I have a vb.net app which used SUB Main. How can I at the end of SUB Main > exit with an exit code picked up by the app that is calling my vb.net app > exe? > > Many Thanks > > Regards > > Function Main () As Integer ' do a lot of really neat stuff Return 0 ' success? you can return what ever you want. End Function Valid declaratons for Main in VB.NET: Sub Main() Sub Main(ByVal args() As String) Function Main() As Integer Function Main(ByVal args() As String) As Integer -- Tom Shelton
Problem with Windows Server 2003 Standard R2
Variable String Limit FILE I/O Inheritance? Interface? Creating a list of a class Is this Normal? A question about a failing regular expression Error adding a data provider to a datagridview control Autosize the last column in a ListView control using WndProc OT: App respository [2008] Collection of DipSwitches |
|||||||||||||||||||||||