System.exit(1) java, equivalent in VB
Can anybody help in finding out what 开发者_开发技巧is the equivalent System.exit(1)
Java, equivalent in VB6.
System.Environment.Exit(1)
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
精彩评论