Visual Basic - Week 1
Visual Basic - Week 1
Visual Basic is a programming language that allows you to create applications by placing controls on a form. Each control has a set of attributes (properties), It reacts to events in which you can write additional piece of code to improve its functionality.
o The run button is used to start your application. o Use the stop button to halt your program
Picture TextBox Label ComboBox CommandButton ListBox Timer DriveListBox DirListBox FileListBox
You can set the properties of the controls at runtime. We will learn that later.
The text box will be automatically given the name text1 as shown in the properties window. Next place a command button on the form. You screen should now look like this.
Next double-click on the command1 button. Add the line below in the code window that appears: Msgbox hello
Change the borderstyle in label1 to fixed single Erase the caption in label1 Change the backcolor in label1 to light green Change the interval attributes in timer1 to 1000