Developing Solutions Using Visual Studio
Developing Solutions Using Visual Studio
Project:
A container that stores files associated with a
specific part of the solution
A solution may contain one or more projects
instructions
Code: - Program instructions
Properties:
a set of attributes that determine an object’s
appearance and behavior
Properties window:
displays properties of selected object
Object box:
Located immediately below Properties window title bar
Contains the name of the selected object
Properties list:
Left column displays names of properties
Use the Alphabetical or Categorized buttons to sort the
display of properties
Settings box:
Right column containing the current value of each property
Text property:
controls the caption displayed on form’s title bar
StartPosition property:
determines the form’s position on the screen when
application starts
Font:
general shape of characters in text
Recommended font is Seqoe UI font
Point:
a measure of font sizes; one point = 1/72 inch
Hungarian notation:
naming convention using three or more character prefix
to represent the object type
Pascal case:
First letter of each word in the name is uppercase
First part of name is object’s purpose
Second part of name is object’s class
Controls:
Objects displayed on a form
Represented as icons in the toolbox
Can be locked in place on the form
Method 2
Click a tool in the toolbox and then click the form.
Method 3
Click a tool in the toolbox, then place the mouse pointer on
the form, and then press the left mouse button and drag the
mouse pointer until the control is the desire size.
CICS 313:Visual Basic Programming - GTUC 2021 Delivery
Manipulate Controls on a Form
To select a control:
Click it in the designer window. OR
Click the list arrow button in the Properties windows Object box.
Camel casing:
lowercase first word; uppercase first letter of each
subsequent word in the name
Not necessary to assign meaningful names for labels
used as prompts because they are never used in code
Labels used for output should have meaningful names
Button control:
Performs an immediate action when clicked
Text property:
specifies the text that appears on the button’s
face
SizeMode property:
handles how the image will be displayed
Settings: Normal, StretchImage,
AutoSize, CenterImage, or Zoom
Event procedure:
set of instructions to be executed when an
event occurs
Tells the object how to respond to an event
Code editor:
used to enter programming code
Sub procedure:
block of code that performs a task
Method:
predefined VB procedure that can be invoked (called)
when needed
Sequential processing: each line is executed in
sequence
Also called a sequence structure
Method 2
Save the solution
Press the F5 key on your keyboard.
Executable file:
Can be run outside of Visual Studio 2013
Has a file extension of .exe
Stored in the project’s bin\Debug folder
Method 2
Click File on the application’s menu bar,
then click exit.
Method 3
Click the close button on the application’s
title bar.
CICS 313:Visual Basic Programming - GTUC 2021 Delivery
Using an Assignment Statement (1/2)
Properties window is used to set property values at
design time
Assignment statement:
assigns a value to a variable or property of a control
Used to set property values at run time
String:
zero or more characters enclosed in quotation
marks
Close a Solution
Click File on the menu bar.
Click Close Solution
Me.Close()
Me.Close()