Computer 10 - Visual Basic (1st Q)
Computer 10 - Visual Basic (1st Q)
BASIC
- Beginners’ All Purpose Symbolic Instruction Code, is a general-purpose,
high-level programming language designed for ease of use.
- created by John G. Kemeny and Thomas Kurtz in 1964 to enable students in
non-scientific fields to use computers.
-It’s been used in teaching introductory concepts of programming.
VISUAL BASIC
● developed by Alan Cooper in the 90’s
● His main purpose was to teach programmers how to design and develop programs
easily using a graphical user interface (GUI).
● In a GUI setting, you work with graphics, forms, and icons instead of typing text to
accomplish a particular task.
● No need to spend much time memorizing commands and their corresponding
parameters.
● Pictures, objects, and images will make it easier for you to remember commands and
their parameters.
Menu bar - located below the Title bar, it contains menu items such as file, edit, view, debug,
tools, and more. (Given was 2022 version)
File menu - contains the commands to Open and Save your project
Edit menu - lists commands related to the Clipboard - cut, copy, and paste commands
Toolbar - shows a list of icons; this is where you can quickly access commonly used
commands. Just click the icon and activate it.
Toolbox - contains objects or controls that you can drag-and-drop onto the form. Ex. Buttons
and text boxes.
Tip 1: To make the toolbox visible all the time, click the drop-down button (small triangle) and
choose dock from the list of options.
Properties window - provides you with a list of property settings that is applicable to the
selected object on the form.
Form - where you place objects & controls, like buttons, checkboxes, labels, listboxes, pictures,
etc.
Intellisense
-a code completion tool built into Visual Studio
- will offer you options or even complete the code for
you Offers syntax tips, or rules on how program codes are
written.
To display a context menu, point to an object and click the right mouse button.
In doing the examples in the book, please note that there are system generated codes and
there are codes that you will write or embed in the method.
Properties, Methods, & Events are basic terms associated with OOP or Object Oriented
Programming languages.
Button
Property - caption, color, and size
Method - show a form object
Event - mouse click
Controls or Objects
-The means by which users interact with an application sysyem
-Intended to get user input and display output
Buttons are placed in the program for users to click it and for your program to carry out the
command associated with that button. Used to extract responses, and invoke special functions
TextBox
- is intended for the user to input text or enter data
-A String is a sequence of characters which can be a combination of letters, numbers, or symbols
Properties
-Something controls and objects have
-Object.Property is used to change the property settings of the Form and Controls used in the
Form during Run Time
- Mouse Click is the event that will trigger the button to perform the method
CheckBoxes RadioButtons
● Valid as a single control but are not ● Mutually exclusive.
mutually exclusive ● User can only select one of the items
● Several can be checked at once
Label
-Represents a standard windows label
-Generally used to display informative text on the GUI that is not changed during run time
Alan Cooper
-Father of Visual Basic
Control or Object properties can be changed during Design Time or during Run Time
Design Time
-When you are creating and developing the application, designing the interface, and writing the
code.
Run Time
-Starts when you click the Start Debugging button or F5
-To change the property during Run Time, double-click Button1 to open the Code Designer
window, and write a code in the following syntax. Objectname.Enabled = False
Visible Property
-Sets the value that indicates whether the control is displayed or not
-Can be changed during Design Time or Run Time
ToolTip
-Represents a small rectangular pop-up window that displays a brief description of a control’s
purpose
Me
-Keyword that refers to the form control itself
Event
-Action recognized by Object or Control
Class Object
● Blueprint for creating objects ● Instance of a class
● Describes properties, methods, and ● Represents real world entities and
events of an object they can perform actions and store
● Promotes code reusability and data defined by their class.
organization ● Such as Button, TextBox, Label