Computing Students - Computer Science Degree Notes
Home Contact Shop Notes Questions Programming Links Dictionary Coursework FORUM Tutors
  Recommended Amazon Searches: Computer Science | Computing | Computer Systems | Database | Computing Revision  

Programming > Visual Basic > Tutorial > 7 - Ending a Program

Now add another command button to your form as shown below:

Once you have done this, double click on the new button and type "end" in the appropriate place as the coding below shows. The "end" that you type automatically changes colour as it is a recognised command in Visual Basic.

    Private Sub Command2_Click()
    End
    End Sub

If you now run the form and click on the second command button, the form will close and stop running. In short, you have created an Exit button.

Now take a look at: Customising VB Buttons

Search for "Visual Basic" on: Google | Kelkoo | Amazon | eBay (UK) | eBay (US)

Search for "Visual Basic" on the rest of Computing Students: Visual Basic

Find Visual Basic (VB) Programming Books in the Computing Students Computer Science Book Shop






Home | Contact | Shop | Notes | Questions | Programming | Links | Dictionary | Coursework | Tutors Sponsored Links: Affiliate Program Articles | Computer Science Definitions | CS Degree Notes
Copyright © 2005-2009 ComputingStudents.com
This site is to be used in accordance with the ComputingStudents.com User Agreement
High Wycombe Web Design