473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

End program

Hi,

Anybody knows the equivalence of
End in VB6 or
WScript.Quit in vbscript

to exit the program?

Thanks in advance
Nov 21 '05 #1
6 15037
Li,

Normally
\\\
me.close
///
or in a program that has started up in a module
\\\
application.exitthread
///
I hope this helps,

Cor
Nov 21 '05 #2
"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:5F**********************************@microsof t.com...
Anybody knows the equivalence of End in VB6 or WScript.Quit
in vbscript to exit the program?


Yes, but because you should never actually /need/ them in a
well-written program, we're not going to tell you ... ;-)

Kill all the Timers, Close all the forms and your application should
happily go away, all by itself. Using anything else is just masking a
problem elsewhere.

Regards,
Phill W.
Nov 21 '05 #3
"Li Pang" <Li****@discussions.microsoft.com> schrieb:
Anybody knows the equivalence of
End in VB6 or
WScript.Quit in vbscript

to exit the program?


This depends on the type of the program. For a simple console application
you can use 'Return' inside your 'Sub Main' to exit the program. In Windows
Forms applications, close all your forms. After closing the application's
main form by calling its 'Close' method, the application will exit. 'End'
still works, but I don't recommend to use it because it will prevent cleanup
code from executing.

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

Nov 21 '05 #4
Hi Li,
Anybody knows the equivalence of
End in VB6 or
WScript.Quit in vbscript


Either Application.Exit() if it is windows GUI application, or
Environment.Exit(errorlevel) if it's console app.

Roman
Nov 21 '05 #5
Thanks all of you,

My situation is: Module1.vb to built an exeutable. I want to terminate app
from a subroutine called from Sub Main(). I will all your recommendation.
"Li Pang" wrote:
Hi,

Anybody knows the equivalence of
End in VB6 or
WScript.Quit in vbscript

to exit the program?

Thanks in advance

Nov 21 '05 #6
end will end the application
application.stop <-- maybe dont remember if it is there.
application.halt
application.end
one of those
take a look at the applicaiton object
"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:13**********************************@microsof t.com...
Thanks all of you,

My situation is: Module1.vb to built an exeutable. I want to terminate app
from a subroutine called from Sub Main(). I will all your recommendation.
"Li Pang" wrote:
Hi,

Anybody knows the equivalence of
End in VB6 or
WScript.Quit in vbscript

to exit the program?

Thanks in advance

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
22
by: edgrsprj | last post by:
PROPOSED EARTHQUAKE FORECASTING COMPUTER PROGRAM DEVELOPMENT EFFORT Posted July 11, 2005 My main earthquake forecasting Web page is: http://www.freewebz.com/eq-forecasting/Data.html ...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
11
by: christopher diggins | last post by:
I am wondering if any can point me to any open-source library with program objects for C++ like there is in Java? I would like to be able to write things like MyProgram1 >> MyProgram2 >>...
1
by: Eric Whittaker | last post by:
hi all, im trying to write my first c++ program. a success, but i can't get the window to stay open after user enters input. it just automatically closes. right now the end of my program looks...
9
by: Hemal | last post by:
Hi All, I need to know the memory required by a c program. Is there any tool/utility which can give me the memory usage in terms of DATA segment, TEXT segment, BSS segment etc. I am working...
7
by: ibtc209 | last post by:
I just started programming in C, and I need some help with this problem. Your program will read the information about one MiniPoker hand, namely the rank and suit of the hand’s first card, and...
2
Banfa
by: Banfa | last post by:
Posted by Banfa The previous tutorial discussed what programming is, what we are trying to achieve, the answer being a list of instructions constituting a valid program. Now we will discuss how...
0
amitpatel66
by: amitpatel66 | last post by:
There is always a requirement that in Oracle Applications, the Concurrent Program need to be execute programatically based on certain conditions/validations: Concurrent programs can be executed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.