Visual Basic: Windows Programming
Learn Visual Basic in FREE step-by-step lessons.
Writing Code in Visual Basic
We have learned to add controls and change properties at design time.
In this lesson we will learn to write code.
In Visual Basic we will write code to execute when an event occurs:
- when the form loads,
- when the user clicks a button,
- or makes a choice,
- or one of the other events that occur.
Sometimes we will use the code to change properties of the form or the controls.
For instance we want to change the backcolor of the form when the user clicks BtnRed.
We may want to hide a control under certain circumstances.
The possibilities are endless! Let's get started!
Please study the material at each of the links below.
- Comments
- Selecting code from list
- Arguments
- Concatenation
- Sender
- The Visible Property
- Selecting Events
Glossary for code lessonFull Glossary