SlideShare a Scribd company logo
1 of 19
Text box:
In order to display or accept user input in the form of text like
name, customer ID, ETC., Visual basic provides you with this
controls. It is used to display text and allows the user to edit the data
in the box. A text box control is also called an edit field or edit
control. It displays the information entered at design time, entered by
the user, or assigned to the control in code at run time.
Command button:
Creates a button that the user can choose to carry out a
command. The user will click on this button and the computer will
perform the task associated with the button.
Activity does not stop with the invoice that you have generated.
A copy may have to be sent to the commercial tax department, the
credit card company, the head office, and so on.
Label box:
It allows you to display text that you don’t want the user to
change, such as a caption under a graphic. When you want to print
the voices, you need to know if the customer is going to pay by
cash or toque, or credit card. This means that the billing clerk has
to select one from the various options available. For this Visual
basic has the option button control.
Check box:
Creates a box that the user can easily choose to indicate if
something is true or false, or to display multiple choices when the
user can choose more than one. There are many more controls that
Visual basic provides that may not be used in the immediate
context. Let us take a look at the other controls that are part of the
standard set of controls available on the toolbox.
Combo box:
The user can either choose an item from the list or
enter a value in the text box. The new value entered can
be added to the existing data. The list box and the combo
box display data usually from a database. In order to
access data and to manipulate data in a database like
access, SQL server, etc. Visual basic provides a control
called the data control.
Image control:
This is very similar to the pictures box control. Images
displayed in an image control can only be decorative and
use fewer resources than a pictures box.
 Moving from one drive to another : The DriveListBox
 Moving from one directory to another : DirListBox
 List file(s) in a dictionary : FileListBox
 The DriveListBox control:
This is a drop-down list box that will display the list
of drives on your computer. It gets all information from the
operating system and allows the user to select a drive of the
choice. Selecting a particular drive records a change in the
Drive property of the DriveListBox.
 The DirListBox control:
A drop-down list box that displays a hierarchical list of
directories in the current drive.
 The FileListBox:
Displays all files in the current Directory or Folder.
Allows users to set up search criteria for files.
These three controls used together can create an
elegant interface that will allow the user to locate a file on
his computer without any sweat.
Add the Common Dialog control to your toolbox by
Right clicking on the toolbox and selecting ‘Components’
from the pop-up menu. Next select ‘Microsoft common
dialog control 6.0 from the list of components. You will see
this as a control on your toolbox.
Draw it on your form. Please note that this control does
not have an interface that the user will see and work on.
During runtime it is not visible. However
The common dialog box control made our life easier
by giving us a simple and easy way to provide the
necessary interface to the user. We were able to create a
small application that would allow the user to create a
new file or open an existing file, add text to it, save the
changes and print the contents of the file as well.
The tree view control is a very interesting control to work
with. With this control you can display the data as a hierarchy.
The windows explorer is built around a tree view control. It
displays the drives, directories, subdirectories and files in the form
of a hierarchy. You can use the same control to display the data
from a database. For example, you can display the list of
customers, the invoice no and date for each customer, and for each
invoice the items therein and so forth.
Working with the tree view control:
Draw a Tree View control on your form. Add the following code to the
form load event.
Private Sub Form_Load()
Dim NewNode As Node
Set NewNode = TreeView1.Nodes.Add(, , ”c”, ”customer”)
Set NewNode = TreeView1.Nodes.Add(“c” , tvwchild , “child1”,
“Customer_Code”)
Set NewNode = TreeView1.Nodes.Add(“c” , tvwchild , “child2”,
“Customer_Name”)
Set NewNode = TreeView1.Nodes.Add(“c” , tvwchild , “child3”,
“Customer_City”)
End Sub
What is database?
A database can be defined as a collection of records stored in
tables. It has a set of rules and tools to manage these records.
There are different type of data bases, each with it’s own format.
the most commonly known data base type are:
 Relational database
 Network model
 Hierarchical model
user 1’s view user 2’s view
Supplier Name
Address
Amount Due
Supplier Name
Address
Physical view
 The database grid control display fields from a record set
object as a series of rows and columns, and enables
manipulation of this data.
 The data aware DBgrid control is like an enhanced grid
control. Once the properties are set, gets populated
automatically with the data from the record set object.
 You only need to fix the number of columns. The total
number of rows is indeterminate. A DB Grid control can
have as many rows as the system resources can support
and about 1700 columns.
 Lets us see the DB Grid in action:
start a new project.
On the form add the following control
 One data control
 One DB grid control
 If you don't have the DB grid control, as part of your tool
box, right click on the tool box. Select components from
the were pop-up menu. From the list displayed there after,
click on DB grid control. click on OK you have it on your
toolbox.
 Set the properties for the controls as follows
Data control
Data base sources: C:/VB/Bibli.mdb
Records sources: Publishers
DB Grid control
data sources: data1
 To open a data base, we have to use the open database
method. This method opens a specified database in a
workspace object and return a reference to the data base
object that represents it.
 Syntax:
Set database = workspace.OpenDatabase (dbname,options,read-
only,connect)
The OpenDatabase method syntax has three parts.
 Databsae
 Workspace
 Dbname
 Options
 Read-only
 Connect
Visual basic programming

More Related Content

What's hot

UNIDAD V: Visual Basic
UNIDAD V: Visual BasicUNIDAD V: Visual Basic
UNIDAD V: Visual Basicrei morales
 
MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)Khader Shaik
 
Tutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft AccessTutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft Accessmcclellm
 
Introduction to microsoft access
Introduction to microsoft accessIntroduction to microsoft access
Introduction to microsoft accessHardik Patel
 
XPages - The Ties That Bind
XPages - The Ties That BindXPages - The Ties That Bind
XPages - The Ties That BindMichael McGarel
 
Binding to multiple datasources on a single xPage
Binding to multiple datasources on a single xPageBinding to multiple datasources on a single xPage
Binding to multiple datasources on a single xPagedominion
 
SAP HANA - Attribute views
SAP HANA - Attribute viewsSAP HANA - Attribute views
SAP HANA - Attribute viewsYasmin Ashraf
 
MS Access teaching powerpoint tasks
MS Access teaching powerpoint tasksMS Access teaching powerpoint tasks
MS Access teaching powerpoint tasksskomadina
 
Understanding dso (data store object) part 1%3a standard dso.doc
Understanding dso (data store object) part 1%3a standard dso.docUnderstanding dso (data store object) part 1%3a standard dso.doc
Understanding dso (data store object) part 1%3a standard dso.docpran1
 
CIS 2303 LO3 Process Modeling
CIS 2303 LO3 Process ModelingCIS 2303 LO3 Process Modeling
CIS 2303 LO3 Process ModelingAhmad Ammari
 
Access Basics 01
Access Basics 01Access Basics 01
Access Basics 01Lets try
 
Ms access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal sahaMs access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal saha253253
 
SAP BW - Creation of hierarchies (time dependant hierachy structures)
SAP BW - Creation of hierarchies (time dependant hierachy structures)SAP BW - Creation of hierarchies (time dependant hierachy structures)
SAP BW - Creation of hierarchies (time dependant hierachy structures)Yasmin Ashraf
 
Sql database terms
Sql database termsSql database terms
Sql database termsJoe Robles
 

What's hot (20)

Ms access 2007
Ms access 2007Ms access 2007
Ms access 2007
 
UNIDAD V: Visual Basic
UNIDAD V: Visual BasicUNIDAD V: Visual Basic
UNIDAD V: Visual Basic
 
MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)MS Access – Part 1 (One Day Workshop)
MS Access – Part 1 (One Day Workshop)
 
Tutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft AccessTutorial for using SQL in Microsoft Access
Tutorial for using SQL in Microsoft Access
 
Introduction to microsoft access
Introduction to microsoft accessIntroduction to microsoft access
Introduction to microsoft access
 
XPages - The Ties That Bind
XPages - The Ties That BindXPages - The Ties That Bind
XPages - The Ties That Bind
 
VB6 Using ADO Data Control
VB6 Using ADO Data ControlVB6 Using ADO Data Control
VB6 Using ADO Data Control
 
MS Access Training
MS Access TrainingMS Access Training
MS Access Training
 
Binding to multiple datasources on a single xPage
Binding to multiple datasources on a single xPageBinding to multiple datasources on a single xPage
Binding to multiple datasources on a single xPage
 
SAP HANA - Attribute views
SAP HANA - Attribute viewsSAP HANA - Attribute views
SAP HANA - Attribute views
 
MS Access teaching powerpoint tasks
MS Access teaching powerpoint tasksMS Access teaching powerpoint tasks
MS Access teaching powerpoint tasks
 
Ms access
Ms accessMs access
Ms access
 
Understanding dso (data store object) part 1%3a standard dso.doc
Understanding dso (data store object) part 1%3a standard dso.docUnderstanding dso (data store object) part 1%3a standard dso.doc
Understanding dso (data store object) part 1%3a standard dso.doc
 
CIS 2303 LO3 Process Modeling
CIS 2303 LO3 Process ModelingCIS 2303 LO3 Process Modeling
CIS 2303 LO3 Process Modeling
 
Access Basics 01
Access Basics 01Access Basics 01
Access Basics 01
 
Ms access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal sahaMs access ppt 2017 by Gopal saha
Ms access ppt 2017 by Gopal saha
 
Dfd examples
Dfd examplesDfd examples
Dfd examples
 
SAP BW - Creation of hierarchies (time dependant hierachy structures)
SAP BW - Creation of hierarchies (time dependant hierachy structures)SAP BW - Creation of hierarchies (time dependant hierachy structures)
SAP BW - Creation of hierarchies (time dependant hierachy structures)
 
Data flow diagram
Data flow diagramData flow diagram
Data flow diagram
 
Sql database terms
Sql database termsSql database terms
Sql database terms
 

Similar to Visual basic programming

Introduction to database with ms access.hetvii
Introduction to database with ms access.hetviiIntroduction to database with ms access.hetvii
Introduction to database with ms access.hetvii07HetviBhagat
 
Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)07HetviBhagat
 
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docxAccess Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docxannetnash8266
 
Online library management system
Online library management systemOnline library management system
Online library management systemYesu Raj
 
Notes windows form controls gui applications
Notes windows form controls   gui applicationsNotes windows form controls   gui applications
Notes windows form controls gui applicationsWilliam Olivier
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database FundamentalsAnanda Gupta
 
Getting Started Guide
Getting Started GuideGetting Started Guide
Getting Started Guideguest5d007d
 
ETL Microsoft Material
ETL Microsoft MaterialETL Microsoft Material
ETL Microsoft MaterialAhmed Hashem
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsRandy Connolly
 
2.3.1 creating database, table and relationship on Access 2003
2.3.1 creating database, table and relationship on Access 20032.3.1 creating database, table and relationship on Access 2003
2.3.1 creating database, table and relationship on Access 2003Steven Alphonce
 

Similar to Visual basic programming (20)

Mca 504 dotnet_unit5
Mca 504 dotnet_unit5Mca 504 dotnet_unit5
Mca 504 dotnet_unit5
 
Introduction to database with ms access.hetvii
Introduction to database with ms access.hetviiIntroduction to database with ms access.hetvii
Introduction to database with ms access.hetvii
 
Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)
 
Ms access 2010
Ms access 2010Ms access 2010
Ms access 2010
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
Android interface elements and controls-chapter8
Android interface elements and controls-chapter8Android interface elements and controls-chapter8
Android interface elements and controls-chapter8
 
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docxAccess Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
 
Online library management system
Online library management systemOnline library management system
Online library management system
 
Grid view control
Grid view controlGrid view control
Grid view control
 
Notes windows form controls gui applications
Notes windows form controls   gui applicationsNotes windows form controls   gui applications
Notes windows form controls gui applications
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database Fundamentals
 
Vb basics
Vb basicsVb basics
Vb basics
 
data binding.docx
data binding.docxdata binding.docx
data binding.docx
 
Getting Started Guide
Getting Started GuideGetting Started Guide
Getting Started Guide
 
nithin raj ppt.ppt
nithin raj ppt.pptnithin raj ppt.ppt
nithin raj ppt.ppt
 
nnr.ppt
nnr.pptnnr.ppt
nnr.ppt
 
Ms Access
Ms AccessMs Access
Ms Access
 
ETL Microsoft Material
ETL Microsoft MaterialETL Microsoft Material
ETL Microsoft Material
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
 
2.3.1 creating database, table and relationship on Access 2003
2.3.1 creating database, table and relationship on Access 20032.3.1 creating database, table and relationship on Access 2003
2.3.1 creating database, table and relationship on Access 2003
 

Recently uploaded

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 

Visual basic programming

  • 1.
  • 2.
  • 3. Text box: In order to display or accept user input in the form of text like name, customer ID, ETC., Visual basic provides you with this controls. It is used to display text and allows the user to edit the data in the box. A text box control is also called an edit field or edit control. It displays the information entered at design time, entered by the user, or assigned to the control in code at run time. Command button: Creates a button that the user can choose to carry out a command. The user will click on this button and the computer will perform the task associated with the button. Activity does not stop with the invoice that you have generated. A copy may have to be sent to the commercial tax department, the credit card company, the head office, and so on.
  • 4. Label box: It allows you to display text that you don’t want the user to change, such as a caption under a graphic. When you want to print the voices, you need to know if the customer is going to pay by cash or toque, or credit card. This means that the billing clerk has to select one from the various options available. For this Visual basic has the option button control. Check box: Creates a box that the user can easily choose to indicate if something is true or false, or to display multiple choices when the user can choose more than one. There are many more controls that Visual basic provides that may not be used in the immediate context. Let us take a look at the other controls that are part of the standard set of controls available on the toolbox.
  • 5. Combo box: The user can either choose an item from the list or enter a value in the text box. The new value entered can be added to the existing data. The list box and the combo box display data usually from a database. In order to access data and to manipulate data in a database like access, SQL server, etc. Visual basic provides a control called the data control. Image control: This is very similar to the pictures box control. Images displayed in an image control can only be decorative and use fewer resources than a pictures box.
  • 6.
  • 7.  Moving from one drive to another : The DriveListBox  Moving from one directory to another : DirListBox  List file(s) in a dictionary : FileListBox
  • 8.  The DriveListBox control: This is a drop-down list box that will display the list of drives on your computer. It gets all information from the operating system and allows the user to select a drive of the choice. Selecting a particular drive records a change in the Drive property of the DriveListBox.  The DirListBox control: A drop-down list box that displays a hierarchical list of directories in the current drive.  The FileListBox: Displays all files in the current Directory or Folder. Allows users to set up search criteria for files. These three controls used together can create an elegant interface that will allow the user to locate a file on his computer without any sweat.
  • 9. Add the Common Dialog control to your toolbox by Right clicking on the toolbox and selecting ‘Components’ from the pop-up menu. Next select ‘Microsoft common dialog control 6.0 from the list of components. You will see this as a control on your toolbox. Draw it on your form. Please note that this control does not have an interface that the user will see and work on. During runtime it is not visible. However
  • 10. The common dialog box control made our life easier by giving us a simple and easy way to provide the necessary interface to the user. We were able to create a small application that would allow the user to create a new file or open an existing file, add text to it, save the changes and print the contents of the file as well.
  • 11. The tree view control is a very interesting control to work with. With this control you can display the data as a hierarchy. The windows explorer is built around a tree view control. It displays the drives, directories, subdirectories and files in the form of a hierarchy. You can use the same control to display the data from a database. For example, you can display the list of customers, the invoice no and date for each customer, and for each invoice the items therein and so forth.
  • 12. Working with the tree view control: Draw a Tree View control on your form. Add the following code to the form load event. Private Sub Form_Load() Dim NewNode As Node Set NewNode = TreeView1.Nodes.Add(, , ”c”, ”customer”) Set NewNode = TreeView1.Nodes.Add(“c” , tvwchild , “child1”, “Customer_Code”) Set NewNode = TreeView1.Nodes.Add(“c” , tvwchild , “child2”, “Customer_Name”) Set NewNode = TreeView1.Nodes.Add(“c” , tvwchild , “child3”, “Customer_City”) End Sub
  • 13.
  • 14. What is database? A database can be defined as a collection of records stored in tables. It has a set of rules and tools to manage these records. There are different type of data bases, each with it’s own format. the most commonly known data base type are:  Relational database  Network model  Hierarchical model
  • 15. user 1’s view user 2’s view Supplier Name Address Amount Due Supplier Name Address Physical view
  • 16.  The database grid control display fields from a record set object as a series of rows and columns, and enables manipulation of this data.  The data aware DBgrid control is like an enhanced grid control. Once the properties are set, gets populated automatically with the data from the record set object.  You only need to fix the number of columns. The total number of rows is indeterminate. A DB Grid control can have as many rows as the system resources can support and about 1700 columns.  Lets us see the DB Grid in action: start a new project. On the form add the following control  One data control  One DB grid control
  • 17.  If you don't have the DB grid control, as part of your tool box, right click on the tool box. Select components from the were pop-up menu. From the list displayed there after, click on DB grid control. click on OK you have it on your toolbox.  Set the properties for the controls as follows Data control Data base sources: C:/VB/Bibli.mdb Records sources: Publishers DB Grid control data sources: data1
  • 18.  To open a data base, we have to use the open database method. This method opens a specified database in a workspace object and return a reference to the data base object that represents it.  Syntax: Set database = workspace.OpenDatabase (dbname,options,read- only,connect) The OpenDatabase method syntax has three parts.  Databsae  Workspace  Dbname  Options  Read-only  Connect