0% found this document useful (0 votes)
11 views11 pages

Wk01 PROG8240 LecNotes

Uploaded by

Bhagyesh Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views11 pages

Wk01 PROG8240 LecNotes

Uploaded by

Bhagyesh Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

PROG8240 Lecture notes – week #01

Structured Programming

Today’s Highlights
• An introduction to Computing and Visual Basic
• Visual Studio Integrated Development
Environment (IDE)

Structured Programming 2

Computer Organization
• Hardware – the physical components of the
computer
• Input units:
• keyboard, touch screen, mouse, etc.
• Output units:
• monitor, printer, speaker, etc.
• Memory units:
• RAM, ROM, etc.
• Central processing unit (CPU):
• multi-core processors, such as dual-core, quad-core, etc.
• Storage units:
• hard drive, flash drive, cloud drive, etc.
Structured Programming 3

1
PROG8240 Lecture notes – week #01
Structured Programming

Computer Organization (cont’d)


• Software – the instructions that tell the
computer what to do
• A software (or program) is a sequence of
instructions.
• Programs can consist of only a few instructions or
millions of lines of instructions.

Structured Programming 4

Computer Programming
• Programs (or software) can be written in many
different languages:
• Machine Language:
• (1) directly understood by computer; (2) consists of 0’s and 1’s; (3)
hard for humans to understand.

• Assembly Language:
• (1) use English-like abbreviations to represent basic operations; (2)
low-level language; (3) assembler is needed to convert assembly
language programs to machine language.

• High-Level Languages:
• (1) easily understood by humans; (2) consists of instructions such as
Click, If, and Do; (3) compiler is needed to convert high-level
language programs to machine language.
Structured Programming 5

2
PROG8240 Lecture notes – week #01
Structured Programming

History of Visual Basic


• Visual Basic, as a high-level programming language,
evolved from BASIC (Beginner’s All-purpose Symbolic
Instruction Code), that was developed in the mid-1960s.
• With the creation of the Windows GUI (Graphical User
Interface), the natural evolution of BASIC was to Visual
Basic, introduced by Microsoft in 1991 to make
programming Windows apps easier.
• Visual Basic 6 was introduced in 1998, and was designed
to make programming fast and easy.
• In 2002, Microsoft released Visual Basic .NET, a more
robust language that is good for most demanding app
development tasks.
• Then, Visual Basic 2008/2010/2012, and 2015/2017/2019,
to meet app development tasks under Windows.
Structured Programming 6

Key Features of Visual Basic


• Visual Basic is an Object-Oriented Programming
(OOP) language.
• Access to the powerful .NET framework class library, a vast
collection of prebuilt components that enable you to develop
apps quickly.
• Visual Basic is event driven.
• Programs are to respond to user-initiated events, such as
mouse clicks, keystrokes, finger swipes, etc.
• Visual Basic is a visual programming language.
• In addition to writing program statements, programmers also
use Visual Studio’s GUI to conveniently drag and drop
predefined objects like buttons, textboxes, etc.

Structured Programming 7

3
PROG8240 Lecture notes – week #01
Structured Programming

Visual Basic 2019 Startup


• Opening screen

Structured Programming 8

Visual Basic 2019 Startup (cont’d)


• Start a new project: Windows Forms App (.NET Framework)

Structured Programming 9

4
PROG8240 Lecture notes – week #01
Structured Programming

Visual Basic 2019 Startup (cont’d)


• Configure your new project:

Structured Programming 10

Visual Basic 2019 Startup (cont’d)


• Windows Forms App

Structured Programming 11

5
PROG8240 Lecture notes – week #01
Structured Programming

Visual Basic 2019 Startup (cont’d)


• Forms and Controls
• The rectangle in the Design area titled
Form1 (called a Form) represents the
main window of the Windows Forms
App that you’re creating.
• Visual Basic apps can have multiple
Forms (windows).
• Form1 can be customized by adding
GUI controls, such as a Label, a Button,
etc.
• Visual Basic has many pre-created
controls for you to build and customize
your apps.
• Collectively, the Form and controls
make up the app’s GUI.
Structured Programming 12

Visual Basic 2019 Startup (cont’d)


• Windows Forms App (cont’d)

Structured Programming 13

6
PROG8240 Lecture notes – week #01
Structured Programming

Visual Basic 2019 Startup (cont’d)


• Menu Bar and Toolbar
• Menu Bar contains groups of related commands for
managing the IDE and for developing, maintaining, and
executing apps.
• Toolbar lists many common menu commands, which
appear as icons.
• Tool tips help you become familiar with the IDE’s features and serve
as useful reminders for each toolbar icon’s functionality.

Structured Programming 14

Visual Basic 2019 Startup (cont’d)


• Windows Forms App (cont’d)

Structured Programming 15

7
PROG8240 Lecture notes – week #01
Structured Programming

Visual Basic 2019 Startup (cont’d)


• Solution Explorer
• It provides access to all of the solution’s files.
• By default, the IDE displays only files that you may need to
edit; and other files that the IDE generates are hidden.
• The Solution Explorer window includes a toolbar that
contains several icons.
• Show All Files icon
• The start-up project appears in bold, while “Form1.vb” is
highlighted.

Structured Programming 16

Visual Basic 2019 Startup (cont’d)


• Windows Forms App (cont’d)

Structured Programming 17

8
PROG8240 Lecture notes – week #01
Structured Programming

Visual Basic 2019 Startup (cont’d)


• Toolbox (Ctrl+Alt+X)
• It groups the prebuilt Group Pushpin
names
controls into categories,
such as All Windows
Forms, Common
Controls, etc.
• Each Control can be
“dragged and dropped”
onto the Form.
• The Toolbox can be
float, or be pinned down.
• Four common Controls:
Button, Label, ListBox,
and Textbox.

Structured Programming 18

Visual Basic 2019 Startup (cont’d)


• Windows Forms App (cont’d)

Structured Programming 19

9
PROG8240 Lecture notes – week #01
Structured Programming

Visual Basic 2019 Startup (cont’d)


• Properties Window
• It displays the properties
for the currently selected
Form, Control, or File in
the Design view.
• Each Form or Control
has its own set of
properties.
• A property’s description
is displayed at the
bottom of the Properties
window whenever that
property is selected.

Structured Programming 20

Visual Basic 2019 Startup (cont’d)


• Properties Window (cont’d)
• Sort the properties either
alphabetically or
categorically.
• Scroll through the list via
either scrollbox or scrollbar
• A Control’s properties can be
visually modified, without
writing code.
• It is crucial to Visual App
Development.

Structured Programming 21

10
PROG8240 Lecture notes – week #01
Structured Programming

Visual Basic 2019 Startup (cont’d)


• Summary of the 5 Key Areas

Structured Programming 22

Visual Basic 2019 Startup (cont’d)


• Using Help
• Microsoft provides extensive help documentation
via the Help menu.
• Visual Studio provides context-sensitive help.
• To use it, highlight the item you need help.
• Then, press the F1 key.

Structured Programming 23

11

You might also like