SlideShare a Scribd company logo
SESSION:-2023-24
my seminor topic is control structure in visual basic
PresentedBy
contents
S no. Particular Page no.
1 INTRODUCTION 01
2 FEATURE OF VISUAL BASIC 02-03
3 VERSION OF VISUAL BASIC 04-05
4 HARDWARE REQUIREMENT FOR VISUAL BASIC 06
5 TO STARTUP VISUAL BASIC 07
6 TYPES OF PROJECT 08-10
7 VISUAL BASIC TOOL BOX 11-15
8 CONTAINER CONTROLS 16
9 SDI OR MDI INTERFACE 17-18
10 SETTING PROPERTIES 19-20
11 FORM LOAD EVENT 21-22
12 SAVING YOUR WORK 23-24
13 CONCLUSION 25
INTRODUCTION
Visual Basic is one very powerful programming
language that help one develop sophisticated, graphical applications that
can be run on Microsoft Windows environment. Visual Basic is actually
Basic language, which is visual in its nature. In general, visual is a
method used to create GUI applications i.e., visual programming style
involves a lot of illustrations (graphic entities), rather than writing
numerous line of code to describe the appearance, functioning etc., of
the application’s interface.
Visual Basic supports event driven programming. A programs,
in general, can be developed in three ways – in modular programming
style or in object oriented programming style or in event driven
programming style.
FEATURESOF VISUALBASIC6.0
VB programming environment provides all
features that are required to develop a graphical user
interface as ready to use components. Some prominent
ones are listed below:
 It allow user for clipboard and printer access.
 It responds to mouse and keyboard actions.
 It is successor of BASIC language.
 VB support event driven programming.
 It has full set of objects i.e., you can draw the application
directly by using the tools available with VB.
 It has powerful db access that allows tools you to create
db front end application include MS SQL server and
other enterprise level db.
 It has ActiveX control technology that allow to use the
functionality provided by other application such as MS
Word processor, MS Excel worksheet and other window
application.
 It has Internet capabilities that make it easy to provide
access to document and application across the Internet
or Intranet sever application.
 It has useful debugger and error handling facilities.
 It has package and development wizard that makes
distributing you application simple.
VERSIONOF VISUALBASIC
 Original VB for DOS and VB for Windows were introduced in
1991.
 The next version of VB 3.0 released in 1993.It was vast
improvement over previous version.
 The next version of VB 4.0 released in 1995 (added 32 bit
application support).
 VB 5.0 it was released in late 1996 new environment
supported creation of ActiveX control deleted 16 bit
application support.
 VB 6.0 with new features:
(4)
i. Fast compiler.
ii. New ActiveX data control object.
iii. New data report designer.
iv. New package and development wizard.
v. Additional internet capability.
(5)
Hardwarerequirement forvisualbasic
Pentium 90 MH2 or higher micro processor.
VGA monitor (640*480 resolution ).
24 Mb RAM, Windows 95, 98 or higher version, 32
MB RAM or higher for Window NT (network).
Color monitor.
Compatible mouse.
(6)
Tostartupvisualbasic
1. Click at Start button.
2. Select All Programs Microsoft Visual Basic.
or
If a Visual Basic is installed on your computer as part
of Microsoft Visual Studio suite, then you may click
at All. Programs Microsoft Visual Studio
Microsoft Visual Studio.
You can also create shortcut to Visual Basic. Then you
just need to double-click this shortcut to get VB
running.
3. And you see Visual Basic startup dialog on you screen.
(7)
Typesof project
A project is a collection of different types of
files that make up a program and an application is the
final program used by the people and that is made up
of one or more projects.
In the New Project dialog, you can click
on various icons for different type of projects /
applications. Following check list gives you an overview
of types of projects / application that can be developed
by clicking at three icons.
(8)
1. Standard EXE : A Standard EXE project is a typical application. This is clicked
to create a standard executable file such as basic Windows application or to
start a large application project.
2. ACTIVEX EXE : With the help of this option you can make ActiveX file which
can be executed without any visual screen. This type of application is also
available with profession edition.
3. ACTIVEX DLL : The ActiveX DLL (Dynamic Link Library) is used to contain
controls and class code that can be used in other projects.
4. ACTIVEX CONTROL : This type of project is also available in Professional
edition of Visual Basic. You can use this type of project to create or develop
your own ActiveX control. An ActiveX Control is a basic element of user
interface, e.g., a text box or a check box or a command button etc.
(9)
5. ActiveX Document EXE : This project is used to create ActiveX
Document in EXE (Executable File Line) form. The ActiveX
Document can be run on many Internet based VB applications.
6. ActiveX Document : This project is used to create ActiveX
documents in DLL form. An ActiveX Document DLL (Dynamic
Link Library) is used by Visual Basic applications that will be
installed and executed from the Internet.
(10)
VISUALBASICTOOLBOX
The Visual Basic toolbox contains the tools that you can use
to draw controls on your forms. As you have seen there are many controls
listed on the toolbox. This section is going to discuss how to use some
commonly used controls.
1. POINTER : This tool doesn’t create any object. It is used for selecting the
object on a form or you can handover the tool.
2. PICTURE BOX : This control is used to show the image on a form. Picture box
supplies may methods for a picture.
3. LABEL : A label is a graphical tool that you can use to display text that a user
cannot change directly. Only the person designing the form can do it.
4.TEXT BOX : A Text box is a control that displays information that you entered
during design mode. Information can also be entered in it during run mode.
Since, this control can be edited, it is also known as edit field or edit control.
5. FRAME : A frame control is used to separate different groups of control on form.
With frame, such a graphing become identifiable.
6. COMMAND BUTTON : A Command button control is used to begin, interrupt or
end a process.
7. CHECK BOX : This control is used to draw a check box on the form. By using the
check box user can decide the things which are true or false. It is used to select
one or two values among many values.
8. OPTION BOX : This control is used to select a single option amongst many
option.
(12)
9. COMBO BOX : Combo box control combines the features of a text box and a
list box control. User can select any item from the list or he can type in the
text box or text can be edited also.
10. LIST BOX : A list box control displays a list of items from which the user can
select one or more items.
11. SCROLL BAR : The scroll bar controls display a long stripe with an indicator
that lets the user select a value between the two ends of a control.
12. TIMER : The timer control is an invisible control which is added to a form if
some task is to be repeated at regular intervals.
13. DRIVE LIST BOX : The drive list box control displays lists the folders in the
current drive.
14. DIRECTORY LIST BOX : The directory list box control lists the folders in the current
drive.
15. FILE LIST BOX : A file list box control locates and lists files in the current directory. It
lists/ shows the files in specified directory during run time only.
16. SHAPE : The shape control is a graphical control that is used a rectangle square, oval,
circle, rounded rectangle or rounded square.
17. LINE : A line control is a graphical control that is used to display a horizontal, vertical
or diagonal line.
18. DATA : This control is used to perform data access operations i.e., through this control
, you can get access to data stored in the database.
(14)
19. IMAGE : The image control is used to display a graphic. An
image control can display a graphic of different available
formats.
20. OLE : This control is used to host another application on your
form for example word excel, document. You can access the
functionality of another application. If that application
support OLE.
(15)
Containercontrols
A container is a control that can hold other controls within it
e.g., a frame (there can be multiple controls inside a frame) or a
picture box (it holds a picture) or simply your form (you can put so
many controls on it). Controls inside a container are known as child
controls. The child controls can exist completely inside their
containers. That mean you can’t move them outside their container
and if you try to drag them beyond the boundary of their container,
part of the control gets hidden.
When you delete a container control, all its child
controls automatically get deleted.
(16)
SDIOR MDIINTERFACE
Two different styles are available for the visual basic IDE; single
document interface (SDI) OR multiple document interface (MDI).To
understand the difference between these two types, consider this -Some
applications, such as word, allow for several form windows in a special
mode called MDI (multiple-document interface) in which you can open
multiple data document within the same application that requires only a
single data window is called an SDI (Single document interface)
application, such as the Windows Notepad application that lets the user
open only one document at a time. SDI applications might support
multiple form however, these forms do not hold multiple data files.
(17)
To switch between SDI and MDI modes, you need to follow
this procedure :
 Select Options from the Tool menu. The Options dialog box will get
displayed.
 Select the Advanced tab from this dialog.
 Check or uncheck the SDI Development Environment check box.
The IDE will start in the selected mode the next time you start Visual
Basic.
(18)
SETTING PROPERTIES
The controls/objects that you draw on your form, have some properties
associated with them.
The Properties Window provides an easy way to set properties
from all objects on a form. To open the properties Window ( if it is not
open), choose the Properties Window command from the View menu. You
may also click the properties Window Button on the toolbar, or you may
use the context menu for the control to select Properties from it.
The Properties Window consists of the following elements:
• OBJECT BOX : Display the name of the object for which you can set
properties. Click the arrow to the right of the object box to display the lists
of objects for the current form.
(19)
• Sort TABS : Choose between an alphabetic listing of properties or
a hierarchical view divided by logical categories, such as those
dealing with appearance, fonts or position.
• Properties list : The left column displays all of the properties for
the selected object. You can edit and view setting n the right
column.
To set properties from the Properties Window
 In the properties window. From the properties list, select the
name of a property.
 In the right column, type or select the new property setting.
(20)
Formloadevent
By now, you have come to know how to draw controls
on a form and how to work with them. A form, in VB is also treated as a
control and it is container control as it can hold other controls in it. There
are many events attached to a form. We are not going to discuss all these
events here but we shall definitely be talking about an important event
attached to a form i.e., the form load event. This event occurs when the
form is loaded in the memory. You can use the form load () event
procedure to prepare the form before showing it on screen when your
program is run.
You can open the Code Window for form load () event procedure
by double clicking on the form at an empty area. You can use this event
procedure to set various properties of controls on the form for example ,
 You may set the caption text for labels, Command Button etc.
 You may even set the form caption i.e., the text for the title bar of the
form.
(21)
You can simplify many more things in the
Form Load () event. Following code written in a
form load () event procedure.
cmdMusic.Caption=“Listing Music”
cmdWrite.Caption=“ Writing Fiction”
lblDisp.Caption=“Select one”
frmMain.Caption=“This is main form”
(22)
Savingyourwork
You can save your project by either clicking at file save command or by
clicking at save icon. The saving process is a little complex in VB but with practice it’ll
become easy for you.
While saving, VB asks you to provide names for each component of VB
project be it from, a module or anything else. Each component needs to be saved
separately along with the project.
While saving, VB application, you need to be concerned with saving from
files. Also saving and project files. In case, module are include in your application,
then you also need to save your modules (.BAS files).
You need not worry about how to save these files separately because when
you click save icon on standard toolbar or select file Save Command , VB
automatically asks you to specify names. For all component
files of VB project one by one.
While saving your files, just makes sure that you are saving then in desired
folder or directory. By default, files are saved in current directory.
There are four save command available under the file
menu in Visual Basic :
Save[Form Name] : Save the currently selected from or module with the current
name. The selected file is identified in the Project Window.
Save [Form Name] As : Like save file, however you have the option to change the file
name.
Save Project : Saves all forms and modules in the current project using their current
names and also save the project file.
Save Project As : Like save project, however you have the option to change file names.
When you choose this option, if you have not saved your forms or modules, you will
also be prompted to save those files. I always use this for new projects.
(24)
conclusion
Visual Basic provide a huge number of graphics tool that you can
use to solve all sorts of problems. By using Graphic objects,
paints and brushes you can draw and fill all shorts of shapes. You
can use stock pens and brushes or create your own with hatch
patterns, gradient fills, textures, custom dash patterns and end
caps, and longitudinal stripes.
The graphics class’s Drawstring method lets you
draw text formatted and wrapped to fit a particular area,
optionally with ellipses. The Bitmap class provides methods for
getting and setting the value of every pixel in an image.
(25)
THANKS

More Related Content

Similar to control structure in visual basic

introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
classall
 
Vb.net ide
Vb.net ideVb.net ide
Vb.net ide
Faisal Aziz
 
Ch02 bronson
Ch02 bronsonCh02 bronson
Ch02 bronson
Bharathi N Reddy
 
Neha
NehaNeha
vb.pptx
vb.pptxvb.pptx
vb.pptx
CherryLim21
 
vb-160518151614.pdf
vb-160518151614.pdfvb-160518151614.pdf
vb-160518151614.pdf
LimEchYrr
 
vb-160518151614.pptx
vb-160518151614.pptxvb-160518151614.pptx
vb-160518151614.pptx
LimEchYrr
 
Visual basic
Visual basicVisual basic
Visual basic
umesh patil
 
Introduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsIntroduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 Fundamentals
Sanay Kumar
 
Vb basic
Vb basicVb basic
Vb basic
IYPUMANI
 
Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)
Mark Vincent Cantero
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
Ranjuma Shubhangi
 
Programming basics
Programming basicsProgramming basics
Programming basics
Senri DLN
 
unit 4.docx
unit 4.docxunit 4.docx
unit 4.docx
Sadhana Sreekanth
 
An isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra dasAn isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra das
Vikash Chandra Das
 
Unit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdfUnit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdf
Ujwala Junghare
 
124157075 gb
124157075 gb124157075 gb
124157075 gb
homeworkping9
 
Pharmacy management system project report..pdf
Pharmacy management system project report..pdfPharmacy management system project report..pdf
Pharmacy management system project report..pdf
Kamal Acharya
 
Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
ASHRAFALI592771
 
Lecture 05. UI programming for Mobile Apps
Lecture 05. UI programming for Mobile AppsLecture 05. UI programming for Mobile Apps
Lecture 05. UI programming for Mobile Apps
Maksym Davydov
 

Similar to control structure in visual basic (20)

introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
 
Vb.net ide
Vb.net ideVb.net ide
Vb.net ide
 
Ch02 bronson
Ch02 bronsonCh02 bronson
Ch02 bronson
 
Neha
NehaNeha
Neha
 
vb.pptx
vb.pptxvb.pptx
vb.pptx
 
vb-160518151614.pdf
vb-160518151614.pdfvb-160518151614.pdf
vb-160518151614.pdf
 
vb-160518151614.pptx
vb-160518151614.pptxvb-160518151614.pptx
vb-160518151614.pptx
 
Visual basic
Visual basicVisual basic
Visual basic
 
Introduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsIntroduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 Fundamentals
 
Vb basic
Vb basicVb basic
Vb basic
 
Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)Introduction to visual basic 6 (1)
Introduction to visual basic 6 (1)
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
Programming basics
Programming basicsProgramming basics
Programming basics
 
unit 4.docx
unit 4.docxunit 4.docx
unit 4.docx
 
An isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra dasAn isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra das
 
Unit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdfUnit -II Introduction to visual programming.pdf
Unit -II Introduction to visual programming.pdf
 
124157075 gb
124157075 gb124157075 gb
124157075 gb
 
Pharmacy management system project report..pdf
Pharmacy management system project report..pdfPharmacy management system project report..pdf
Pharmacy management system project report..pdf
 
Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
 
Lecture 05. UI programming for Mobile Apps
Lecture 05. UI programming for Mobile AppsLecture 05. UI programming for Mobile Apps
Lecture 05. UI programming for Mobile Apps
 

More from classall

E -COMMERCE.ppt
E -COMMERCE.pptE -COMMERCE.ppt
E -COMMERCE.ppt
classall
 
CONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VBCONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VB
classall
 
operat in vb .pptx
operat in vb .pptxoperat in vb .pptx
operat in vb .pptx
classall
 
Tally_Tutor_1.ppt
Tally_Tutor_1.pptTally_Tutor_1.ppt
Tally_Tutor_1.ppt
classall
 
networking
networking networking
networking
classall
 
introduction to e-commerce.pptx
introduction to e-commerce.pptxintroduction to e-commerce.pptx
introduction to e-commerce.pptx
classall
 
E-Rdiagram.ppt
E-Rdiagram.pptE-Rdiagram.ppt
E-Rdiagram.ppt
classall
 
EDI presentation.pptx
EDI presentation.pptxEDI presentation.pptx
EDI presentation.pptx
classall
 
b,Sc it data structure.ppt
b,Sc it data structure.pptb,Sc it data structure.ppt
b,Sc it data structure.ppt
classall
 
SAVE WATER SAVE LIFE
SAVE WATER SAVE LIFESAVE WATER SAVE LIFE
SAVE WATER SAVE LIFE
classall
 
MS OFFICE
MS OFFICEMS OFFICE
MS OFFICE
classall
 
MULTIMEDIA
MULTIMEDIAMULTIMEDIA
MULTIMEDIA
classall
 
GEETA2.pptx
GEETA2.pptxGEETA2.pptx
GEETA2.pptx
classall
 
GEETA1.pptx
GEETA1.pptxGEETA1.pptx
GEETA1.pptx
classall
 
GEETA.pptx
GEETA.pptxGEETA.pptx
GEETA.pptx
classall
 
राष्ट्रीय एकता 13.3.18.ppt
राष्ट्रीय एकता 13.3.18.pptराष्ट्रीय एकता 13.3.18.ppt
राष्ट्रीय एकता 13.3.18.ppt
classall
 
mmu.pptx
mmu.pptxmmu.pptx
mmu.pptx
classall
 
b,Sc it data structure.pptx
b,Sc it data structure.pptxb,Sc it data structure.pptx
b,Sc it data structure.pptx
classall
 
MEMORY NOTES.pptx
MEMORY NOTES.pptxMEMORY NOTES.pptx
MEMORY NOTES.pptx
classall
 
HINDI MEMORY NOTES
HINDI MEMORY NOTESHINDI MEMORY NOTES
HINDI MEMORY NOTES
classall
 

More from classall (20)

E -COMMERCE.ppt
E -COMMERCE.pptE -COMMERCE.ppt
E -COMMERCE.ppt
 
CONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VBCONTROL STRUCTURE IN VB
CONTROL STRUCTURE IN VB
 
operat in vb .pptx
operat in vb .pptxoperat in vb .pptx
operat in vb .pptx
 
Tally_Tutor_1.ppt
Tally_Tutor_1.pptTally_Tutor_1.ppt
Tally_Tutor_1.ppt
 
networking
networking networking
networking
 
introduction to e-commerce.pptx
introduction to e-commerce.pptxintroduction to e-commerce.pptx
introduction to e-commerce.pptx
 
E-Rdiagram.ppt
E-Rdiagram.pptE-Rdiagram.ppt
E-Rdiagram.ppt
 
EDI presentation.pptx
EDI presentation.pptxEDI presentation.pptx
EDI presentation.pptx
 
b,Sc it data structure.ppt
b,Sc it data structure.pptb,Sc it data structure.ppt
b,Sc it data structure.ppt
 
SAVE WATER SAVE LIFE
SAVE WATER SAVE LIFESAVE WATER SAVE LIFE
SAVE WATER SAVE LIFE
 
MS OFFICE
MS OFFICEMS OFFICE
MS OFFICE
 
MULTIMEDIA
MULTIMEDIAMULTIMEDIA
MULTIMEDIA
 
GEETA2.pptx
GEETA2.pptxGEETA2.pptx
GEETA2.pptx
 
GEETA1.pptx
GEETA1.pptxGEETA1.pptx
GEETA1.pptx
 
GEETA.pptx
GEETA.pptxGEETA.pptx
GEETA.pptx
 
राष्ट्रीय एकता 13.3.18.ppt
राष्ट्रीय एकता 13.3.18.pptराष्ट्रीय एकता 13.3.18.ppt
राष्ट्रीय एकता 13.3.18.ppt
 
mmu.pptx
mmu.pptxmmu.pptx
mmu.pptx
 
b,Sc it data structure.pptx
b,Sc it data structure.pptxb,Sc it data structure.pptx
b,Sc it data structure.pptx
 
MEMORY NOTES.pptx
MEMORY NOTES.pptxMEMORY NOTES.pptx
MEMORY NOTES.pptx
 
HINDI MEMORY NOTES
HINDI MEMORY NOTESHINDI MEMORY NOTES
HINDI MEMORY NOTES
 

Recently uploaded

Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 

Recently uploaded (20)

Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 

control structure in visual basic

  • 1. SESSION:-2023-24 my seminor topic is control structure in visual basic PresentedBy
  • 2. contents S no. Particular Page no. 1 INTRODUCTION 01 2 FEATURE OF VISUAL BASIC 02-03 3 VERSION OF VISUAL BASIC 04-05 4 HARDWARE REQUIREMENT FOR VISUAL BASIC 06 5 TO STARTUP VISUAL BASIC 07 6 TYPES OF PROJECT 08-10 7 VISUAL BASIC TOOL BOX 11-15 8 CONTAINER CONTROLS 16 9 SDI OR MDI INTERFACE 17-18 10 SETTING PROPERTIES 19-20 11 FORM LOAD EVENT 21-22 12 SAVING YOUR WORK 23-24 13 CONCLUSION 25
  • 3. INTRODUCTION Visual Basic is one very powerful programming language that help one develop sophisticated, graphical applications that can be run on Microsoft Windows environment. Visual Basic is actually Basic language, which is visual in its nature. In general, visual is a method used to create GUI applications i.e., visual programming style involves a lot of illustrations (graphic entities), rather than writing numerous line of code to describe the appearance, functioning etc., of the application’s interface. Visual Basic supports event driven programming. A programs, in general, can be developed in three ways – in modular programming style or in object oriented programming style or in event driven programming style.
  • 4. FEATURESOF VISUALBASIC6.0 VB programming environment provides all features that are required to develop a graphical user interface as ready to use components. Some prominent ones are listed below:  It allow user for clipboard and printer access.  It responds to mouse and keyboard actions.  It is successor of BASIC language.  VB support event driven programming.  It has full set of objects i.e., you can draw the application directly by using the tools available with VB.  It has powerful db access that allows tools you to create db front end application include MS SQL server and other enterprise level db.
  • 5.  It has ActiveX control technology that allow to use the functionality provided by other application such as MS Word processor, MS Excel worksheet and other window application.  It has Internet capabilities that make it easy to provide access to document and application across the Internet or Intranet sever application.  It has useful debugger and error handling facilities.  It has package and development wizard that makes distributing you application simple.
  • 6. VERSIONOF VISUALBASIC  Original VB for DOS and VB for Windows were introduced in 1991.  The next version of VB 3.0 released in 1993.It was vast improvement over previous version.  The next version of VB 4.0 released in 1995 (added 32 bit application support).  VB 5.0 it was released in late 1996 new environment supported creation of ActiveX control deleted 16 bit application support.  VB 6.0 with new features: (4)
  • 7. i. Fast compiler. ii. New ActiveX data control object. iii. New data report designer. iv. New package and development wizard. v. Additional internet capability. (5)
  • 8. Hardwarerequirement forvisualbasic Pentium 90 MH2 or higher micro processor. VGA monitor (640*480 resolution ). 24 Mb RAM, Windows 95, 98 or higher version, 32 MB RAM or higher for Window NT (network). Color monitor. Compatible mouse. (6)
  • 9. Tostartupvisualbasic 1. Click at Start button. 2. Select All Programs Microsoft Visual Basic. or If a Visual Basic is installed on your computer as part of Microsoft Visual Studio suite, then you may click at All. Programs Microsoft Visual Studio Microsoft Visual Studio. You can also create shortcut to Visual Basic. Then you just need to double-click this shortcut to get VB running. 3. And you see Visual Basic startup dialog on you screen. (7)
  • 10. Typesof project A project is a collection of different types of files that make up a program and an application is the final program used by the people and that is made up of one or more projects. In the New Project dialog, you can click on various icons for different type of projects / applications. Following check list gives you an overview of types of projects / application that can be developed by clicking at three icons. (8)
  • 11. 1. Standard EXE : A Standard EXE project is a typical application. This is clicked to create a standard executable file such as basic Windows application or to start a large application project. 2. ACTIVEX EXE : With the help of this option you can make ActiveX file which can be executed without any visual screen. This type of application is also available with profession edition. 3. ACTIVEX DLL : The ActiveX DLL (Dynamic Link Library) is used to contain controls and class code that can be used in other projects. 4. ACTIVEX CONTROL : This type of project is also available in Professional edition of Visual Basic. You can use this type of project to create or develop your own ActiveX control. An ActiveX Control is a basic element of user interface, e.g., a text box or a check box or a command button etc. (9)
  • 12. 5. ActiveX Document EXE : This project is used to create ActiveX Document in EXE (Executable File Line) form. The ActiveX Document can be run on many Internet based VB applications. 6. ActiveX Document : This project is used to create ActiveX documents in DLL form. An ActiveX Document DLL (Dynamic Link Library) is used by Visual Basic applications that will be installed and executed from the Internet. (10)
  • 13. VISUALBASICTOOLBOX The Visual Basic toolbox contains the tools that you can use to draw controls on your forms. As you have seen there are many controls listed on the toolbox. This section is going to discuss how to use some commonly used controls. 1. POINTER : This tool doesn’t create any object. It is used for selecting the object on a form or you can handover the tool. 2. PICTURE BOX : This control is used to show the image on a form. Picture box supplies may methods for a picture. 3. LABEL : A label is a graphical tool that you can use to display text that a user cannot change directly. Only the person designing the form can do it.
  • 14. 4.TEXT BOX : A Text box is a control that displays information that you entered during design mode. Information can also be entered in it during run mode. Since, this control can be edited, it is also known as edit field or edit control. 5. FRAME : A frame control is used to separate different groups of control on form. With frame, such a graphing become identifiable. 6. COMMAND BUTTON : A Command button control is used to begin, interrupt or end a process. 7. CHECK BOX : This control is used to draw a check box on the form. By using the check box user can decide the things which are true or false. It is used to select one or two values among many values. 8. OPTION BOX : This control is used to select a single option amongst many option. (12)
  • 15. 9. COMBO BOX : Combo box control combines the features of a text box and a list box control. User can select any item from the list or he can type in the text box or text can be edited also. 10. LIST BOX : A list box control displays a list of items from which the user can select one or more items. 11. SCROLL BAR : The scroll bar controls display a long stripe with an indicator that lets the user select a value between the two ends of a control. 12. TIMER : The timer control is an invisible control which is added to a form if some task is to be repeated at regular intervals. 13. DRIVE LIST BOX : The drive list box control displays lists the folders in the current drive.
  • 16. 14. DIRECTORY LIST BOX : The directory list box control lists the folders in the current drive. 15. FILE LIST BOX : A file list box control locates and lists files in the current directory. It lists/ shows the files in specified directory during run time only. 16. SHAPE : The shape control is a graphical control that is used a rectangle square, oval, circle, rounded rectangle or rounded square. 17. LINE : A line control is a graphical control that is used to display a horizontal, vertical or diagonal line. 18. DATA : This control is used to perform data access operations i.e., through this control , you can get access to data stored in the database. (14)
  • 17. 19. IMAGE : The image control is used to display a graphic. An image control can display a graphic of different available formats. 20. OLE : This control is used to host another application on your form for example word excel, document. You can access the functionality of another application. If that application support OLE. (15)
  • 18. Containercontrols A container is a control that can hold other controls within it e.g., a frame (there can be multiple controls inside a frame) or a picture box (it holds a picture) or simply your form (you can put so many controls on it). Controls inside a container are known as child controls. The child controls can exist completely inside their containers. That mean you can’t move them outside their container and if you try to drag them beyond the boundary of their container, part of the control gets hidden. When you delete a container control, all its child controls automatically get deleted. (16)
  • 19. SDIOR MDIINTERFACE Two different styles are available for the visual basic IDE; single document interface (SDI) OR multiple document interface (MDI).To understand the difference between these two types, consider this -Some applications, such as word, allow for several form windows in a special mode called MDI (multiple-document interface) in which you can open multiple data document within the same application that requires only a single data window is called an SDI (Single document interface) application, such as the Windows Notepad application that lets the user open only one document at a time. SDI applications might support multiple form however, these forms do not hold multiple data files. (17)
  • 20. To switch between SDI and MDI modes, you need to follow this procedure :  Select Options from the Tool menu. The Options dialog box will get displayed.  Select the Advanced tab from this dialog.  Check or uncheck the SDI Development Environment check box. The IDE will start in the selected mode the next time you start Visual Basic. (18)
  • 21. SETTING PROPERTIES The controls/objects that you draw on your form, have some properties associated with them. The Properties Window provides an easy way to set properties from all objects on a form. To open the properties Window ( if it is not open), choose the Properties Window command from the View menu. You may also click the properties Window Button on the toolbar, or you may use the context menu for the control to select Properties from it. The Properties Window consists of the following elements: • OBJECT BOX : Display the name of the object for which you can set properties. Click the arrow to the right of the object box to display the lists of objects for the current form. (19)
  • 22. • Sort TABS : Choose between an alphabetic listing of properties or a hierarchical view divided by logical categories, such as those dealing with appearance, fonts or position. • Properties list : The left column displays all of the properties for the selected object. You can edit and view setting n the right column. To set properties from the Properties Window  In the properties window. From the properties list, select the name of a property.  In the right column, type or select the new property setting. (20)
  • 23. Formloadevent By now, you have come to know how to draw controls on a form and how to work with them. A form, in VB is also treated as a control and it is container control as it can hold other controls in it. There are many events attached to a form. We are not going to discuss all these events here but we shall definitely be talking about an important event attached to a form i.e., the form load event. This event occurs when the form is loaded in the memory. You can use the form load () event procedure to prepare the form before showing it on screen when your program is run. You can open the Code Window for form load () event procedure by double clicking on the form at an empty area. You can use this event procedure to set various properties of controls on the form for example ,  You may set the caption text for labels, Command Button etc.  You may even set the form caption i.e., the text for the title bar of the form. (21)
  • 24. You can simplify many more things in the Form Load () event. Following code written in a form load () event procedure. cmdMusic.Caption=“Listing Music” cmdWrite.Caption=“ Writing Fiction” lblDisp.Caption=“Select one” frmMain.Caption=“This is main form” (22)
  • 25. Savingyourwork You can save your project by either clicking at file save command or by clicking at save icon. The saving process is a little complex in VB but with practice it’ll become easy for you. While saving, VB asks you to provide names for each component of VB project be it from, a module or anything else. Each component needs to be saved separately along with the project. While saving, VB application, you need to be concerned with saving from files. Also saving and project files. In case, module are include in your application, then you also need to save your modules (.BAS files). You need not worry about how to save these files separately because when you click save icon on standard toolbar or select file Save Command , VB automatically asks you to specify names. For all component
  • 26. files of VB project one by one. While saving your files, just makes sure that you are saving then in desired folder or directory. By default, files are saved in current directory. There are four save command available under the file menu in Visual Basic : Save[Form Name] : Save the currently selected from or module with the current name. The selected file is identified in the Project Window. Save [Form Name] As : Like save file, however you have the option to change the file name. Save Project : Saves all forms and modules in the current project using their current names and also save the project file. Save Project As : Like save project, however you have the option to change file names. When you choose this option, if you have not saved your forms or modules, you will also be prompted to save those files. I always use this for new projects. (24)
  • 27. conclusion Visual Basic provide a huge number of graphics tool that you can use to solve all sorts of problems. By using Graphic objects, paints and brushes you can draw and fill all shorts of shapes. You can use stock pens and brushes or create your own with hatch patterns, gradient fills, textures, custom dash patterns and end caps, and longitudinal stripes. The graphics class’s Drawstring method lets you draw text formatted and wrapped to fit a particular area, optionally with ellipses. The Bitmap class provides methods for getting and setting the value of every pixel in an image. (25)