Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1


Ratings: (0)|Views: 408|Likes:
Published by hebi_alucard
VB Notes; Introduction with Quiz
VB Notes; Introduction with Quiz

More info:

Published by: hebi_alucard on Feb 17, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less





This website is for programmers and would-be programmers who want to learn visual basic as quickly as possible, You will be quickly creating applications by following the simple examples. All the applicationsfeatured are fully functional windows applications with all the usual user-interface controls such as command buttons, labels and textboxes.As long as you are familiar with Windows 95, you can easily create applications with Visual Basic. You don'thave to be a windows expert, but you should feel comfortable working with menus, the mouse and the windowsinterface. If you've opened, closed and re-sized windows you should have the ability to make your own VisualBasic applications in no time at all.
What is a programming language ?!
A Computer cannot understand any persons spoken language. A spoken language such as English , French, issimply too general and ambiguous for computers to understand. Therefore, we must adapt to the machine andlearn the computer language so that the computer can understand. This is where visual basic comes into it -when you type visual basic source code into the computer, the computer processes these statements into VisualBasic language. The statements in visual basic, however, do not have multiple meanings within the samecontext.
This sounds great what else will I need!?
You will require a Windows 95-compatible computer with at least Windows 95 or Windows NT installed andmust importantly Visual Basic!.
At the momenet there is no freeware version of Visual basic available
Lesson 1
Hopefully you will learn this during lesson 1. :
About the Development Environment
The project explorer windows
Running a form
Making your first *.exe
Understanding the tool bar 
Introducing Source code
Command Button properties
Explanations of global modules
Opening an existing Visual Basic project.
Explore the forms and the source code behind the an existing project in design mode
Recognise and understand the function of the main component of the Visual Basic environment eg.toolbar's , toolboxes , project window, properties window and most importantly the source code window.
Saving your project to a file.
Button Properties.
The Development Environment
Learning the ins and outs of the Development Environment before you learn visual basic is somewhat likelearning for a test you must know where all the functions belong and what their purpose is. First we will startwith labelling the development environment.
The above diagram shows the development environment with all the important points labelled. Many of Visual basic functions work similar to Microsoft word eg the
Tool Bar
and the tool box is similar to other products onthe market which work off a single click then drag the width of the object required. The
Tool Box
contains thecontrol you placed on the form window. All of the controls that appear on the
Tool Box
controls on the above picture never runs out of controls as soon as you place one on the form another awaits you on the
ready to be placed as needed.
The project explorer window
The Project explorer window gives you a tree-structured view of all the files inserted into the application. Youcan expand these and collapse branches of the views to get more or less detail (
Project explorer
). The projectexplorer window displays forms, modules or other separators which are supported by the visual basic likeclass'es and Advanced Modules. If you want to select a form on its own simply double click on the projectexplorer window for a more detailed look. And it will display it where the
Default form
is located.
Properties Window
Some programmers prefer the Categorisizedview of the properties window. By defaulting, the properties window displays its properties alphabetically (withthe exception of the name value) when you click on the categorized button the window changes to left picture.
The Default Layout
When we start Visual Basic, we are provided with a VB project.A VB project is a collection of thefollowing modules and files.
global module(
contains declaration and procedures
form module(
that contains the graphic elements of the VB application along withthe
general module (
that generally contains general-purpose instructions not pertaining toanything graphic on-screen)
class module
(that contains the defining characteristics of a class, including its properties and methods)
resource files(
that allows you to collect all of the texts and bitmaps for an applicationin one place)
On start up, Visual Basic will displays the following windows :
Blank Form
It also includes a
that consists of all the controls essential for developing a VB Application. Controlsare tools such as boxes, buttons, labels and other objects draw on a form to get
display output
. Theyalso add visual appeal.
Understanding the tool box.
You may have noticed that when you click on differentcontrols the
Properties Window
changes slightly this isdue to different controls having different functions.Therefore more options are needed for example if youhad a picture then you want to show an image. But if youwanted to open a internet connection you would have tofill in the remote host and other such settings. When youuse the command () you will find that a new set of  properties come up the following will provide adescription and a property.
Opening an existing Visual Basic project.
Microsoft have included some freebies with visual basic to show its capabilities and functions. Dismantling or modifying these sample projects is a good way to understand what is happening at runtime. These files can belocated at your default directory
To Open these projects choose 'Open Project' from the 'File' menu. Then Double click on thesamples folder to open the directory then Double click on any project to load it.
Opening a new visual basic file & Inserting Source code.
From looking at the examples it time to make your own application. Choose 'New Project' from the 'File' menu.Use the blank form1 to design a simple interface for an estate agents database, have some textboxes for namesand other details. Insert some controls and make it look professional. Textboxes can be used to store there nameand other details, make sure you put a picture box in for a picture of the house.
 Now insert the following source code for your application.Private Sub Form_Load()Picture1.Picture = LoadPicture("C:\Program Files\VB\Graphics\Icons\Misc\MISC42.ICO")End Sub
Running and viewing the project in detail.
Once an application is loaded it can be run by click on the
icon from the toolbar, to pause press
and toterminate use

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->