Can anybody help in finding out what is the equivalent System.exit(1)
Java, equivalent in VB6.
views:
82answers:
2oops, thanks @Justin
Matthew J Morrison
2010-08-18 19:18:16
@Matt, you are welcome.
jjnguy
2010-08-18 19:32:30
@Matthew: That's VB.NET not VB6
SoMoS
2010-08-19 10:54:45
+1
A:
Well, as you're talking VB6, not VB.NET, I think the best you can do is ...
Private Declare Sub ExitProcess Lib "kernel32" (ByVal uExitCode As Long)
And then when you want to exit, use, for example ...
' Exit with ErrorLevel set to 9
ExitProcess 9
Note, however, many dire warnings about ending a VB6 program in such an "untidy" way. See, for example, the thread at http://www.codenewsgroups.net/group/microsoft.public.vb.general.discussion/topic10328.aspx
gdt
2010-08-18 21:29:46