Changes

Jump to: navigation, search

A Simple Visual Basic Example

737 bytes added, 18:31, 16 July 2007
Setting Control Properties
[[Image:Examp.jpg]]
 
== Creating an Event ==
 
The next step is to make the ''Close'' button do something when it is pressed. Bfore we do that we need to give the button a more meaningful name. Visual Studio have given the button a default name of ''Button1''. While this is fine for a small design it will quickly become difficult to work with such names in larger applications containing many buttons. With the Button selected in the Form, scroll up to the top of the properties list and change ''(Name)'' from ''Button1'' to ''closeButton''.
 
Having changed the name we can now add an event to the button. Double click on the ''Button'' in the Form to display the event code for the ''closeButton'' control. Visual Studio will display the following code:

Navigation menu