SlideShare a Scribd company logo
1 of 27
Juanito Bibat
Angelika Cabus
Code for Visual Basic
 There are many sources of code
 within the Visual Basic
 documentation set. This topic
 helps you get started in locating
 that code. Note that some of this
 code is contained within topics
 that provide further explanation
 or instructions on how to perform
 a task, whereas some is contained
 in special topics devoted only to
 displaying a code example.
   Visual Basic applications usually
    consist of the following:


    1.Forms-an application may
    consits of one or more
    forms.
    2.Form controls-forms are
    created with controls.
    3.Code-programming language
    that will direct application
    execution.
*   Input and output-are terms used to
    describe the method of receiving data and
    sending data from the computer to the user.
    *Form module-a module file
    that holds one or more
    forms.
    *Standard module-a file that
    holds code that is not related to
    a form.
    *String-a series of
    characters that is treated
    as a single entity.
Output / Input
FORM
FORM MODULE




STANDARD
MODULE
STRING
Data
 basics:)
Data types
The three broad categories of data
in Visual Basic.

1.numeric-for numbers used in
data
2.string-for alphanumeric data
3.special-for special data type
including items that check box
values
VISUAL       Description
BASIC DATA   and range
TYPES
             Data type that
             takes one of two
BOOLEAN      of the following
             values true or
             false.
             Numeric values
BYTE         without
             decimals from
             0 to 255
Here's a simple Visual Basic form. It looks just like any other form that you use in Windows applications. The header area has a caption, the control menu, and the minimize/ma




                                                                          Holds tdate and time values
                                                                          from 0:00:00(midnight) on
          DATE                                                            january 1, 0001 through 11:59:59
                                                                          PM on december
                                                                          31, 9999

                                                                             That represents
    Decimal                                                                  numbers with 28
                                                                             decimal places

                                                                            Numeric values from -
     Double                                                                 1.79769313486232E+308
                                                                            To
                                                                            1.79769313486232E+308.
NUMERIC VALUES
INTEGER   WITH NO DECIMAL
          POINT FROM -32,768
          TO 32,767
          THE INTEGER DATA VALUES
LONG      FROM-2,147,483,647



          SPECIAL DATA TYPE
OBJECT    THT HOLDS CONTROLS
          AND FORMS.

SINGLE    NUMERIC VALUES FROM -
          3.402823E+38 TO 3.402823E+38.
THE DIM STATEMENTS LOCATION
 Dim that appears in an event
procedure and can only be
used within that event
procedure called a Local
variable.Dim in a module’s
general section that can
access all the variables
within that module is called
Global variable.
The Dim statement is usually
written in the following format:

*Dim VarName As DataType

*VarName is a variable name
that you create  .
Prefix Data type example
 Bln   Boolean    blnlsOverTime

 Byt   Byte          bytAge
 Cur   Currency curHourlyPay

 Dtm   Date      dteFirstBegan
Dbl    Double dblMicroMeasurement
Int Integer ingCount
Lng Long lngStarDistance
Obj Object objSoundClip
Sng Single sngYearSales
Str String strLastName
Vnt or
var    Variant vntControlValue
Take note of the following code:


  curNetSales =curGrissSales
  - curCostOfSales


   intResult = (1 + 2 ) * 3
Working with scientific
 notation
 Scientific notation is used
to represent extremely
large and small decimal
numbers without
including a lot of zeros or
other digits.
To convert a scientific
 notation value to its real
 value:
 1.After the D or E ,raise 10 to the number.for
 example,the +6 in the number 1.2345E+6 raise 10
 to the 6th power to get 1,000,000.


2.Multiply the number at the left of
the D or E by the value in step
1.Multiply 1.2345 by the 1,000,000 to
get a result of 1,234,500.
Variables that hold data
To hold data that can change based on
calculations or the changes can be stated
within the application,variables must be
declared.
The Dim statement lets you recognize that the
variables holds the Currency data type and
The curToTalSales is the variable’s name.
Expressions and math
operators
 Math operators allow
calculation and assignment
of expression results to
variables when you code
assignment statements that
contain expressions.
Visual basic primary
math operators
Operator Description
 +     Adds two values
       Subtracts one
 -     value from
       another value
*          Multiplies
            two values
 /         Divides one value
           by another value
           Raises a value
 ^         to a power
           Concatenates
& (or +)   two strings
Concatenation
 The concatenation
operator joins one
string to the end of
another.
Take note of the
following code:
strFullName = lblFirstName
& “ “ & lblLastName
Visual basic coding

More Related Content

What's hot

Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1Deepak John
 
Data representation
 Data representation Data representation
Data representationAshraf Miraz
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1Abdul Khan
 
Data representation computer architecture
Data representation  computer architectureData representation  computer architecture
Data representation computer architecturestudy cse
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeBala Ganesh
 
data representation
 data representation data representation
data representationHaroon_007
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computersHazel Anne Quirao
 
Representation of Integers
Representation of IntegersRepresentation of Integers
Representation of IntegersSusantha Herath
 
Lec 02 data representation part 2
Lec 02 data representation part 2Lec 02 data representation part 2
Lec 02 data representation part 2Abdul Khan
 
Fixed point and floating-point numbers
Fixed point and  floating-point numbersFixed point and  floating-point numbers
Fixed point and floating-point numbersMOHAN MOHAN
 
CArcMOOC 02.04 - Special encodings
CArcMOOC 02.04 - Special encodingsCArcMOOC 02.04 - Special encodings
CArcMOOC 02.04 - Special encodingsAlessandro Bogliolo
 
digital logic design number system
digital logic design number systemdigital logic design number system
digital logic design number systemNallapati Anindra
 

What's hot (20)

Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Data representation
 Data representation Data representation
Data representation
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1
 
Data representation computer architecture
Data representation  computer architectureData representation  computer architecture
Data representation computer architecture
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
 
Csc 2313 (lecture 3)
Csc 2313 (lecture 3)Csc 2313 (lecture 3)
Csc 2313 (lecture 3)
 
Data representation
Data representationData representation
Data representation
 
data representation
 data representation data representation
data representation
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 
Representation of Integers
Representation of IntegersRepresentation of Integers
Representation of Integers
 
Lec 02 data representation part 2
Lec 02 data representation part 2Lec 02 data representation part 2
Lec 02 data representation part 2
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Data representation
Data representationData representation
Data representation
 
F044033742
F044033742F044033742
F044033742
 
Fixed point and floating-point numbers
Fixed point and  floating-point numbersFixed point and  floating-point numbers
Fixed point and floating-point numbers
 
CArcMOOC 02.04 - Special encodings
CArcMOOC 02.04 - Special encodingsCArcMOOC 02.04 - Special encodings
CArcMOOC 02.04 - Special encodings
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
 
digital logic design number system
digital logic design number systemdigital logic design number system
digital logic design number system
 

Viewers also liked (15)

Lo39
Lo39Lo39
Lo39
 
Chapter 10
Chapter 10 Chapter 10
Chapter 10
 
C++ Sample Codes (Data Structure)
C++ Sample Codes (Data Structure)C++ Sample Codes (Data Structure)
C++ Sample Codes (Data Structure)
 
Code Inventory
Code InventoryCode Inventory
Code Inventory
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
 
How to Work with Dev-C++
How to Work with Dev-C++How to Work with Dev-C++
How to Work with Dev-C++
 
Payroll
PayrollPayroll
Payroll
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
visual basic for the beginner
visual basic for the beginnervisual basic for the beginner
visual basic for the beginner
 
Atm (bm)
Atm (bm)Atm (bm)
Atm (bm)
 
An atm with an eye
An atm with an eyeAn atm with an eye
An atm with an eye
 
automated teller machines
automated teller  machinesautomated teller  machines
automated teller machines
 
Payroll Management System SRS
Payroll Management System SRSPayroll Management System SRS
Payroll Management System SRS
 
Atm System
Atm SystemAtm System
Atm System
 
Visual Basic Codes And Screen Designs
Visual Basic Codes And Screen DesignsVisual Basic Codes And Screen Designs
Visual Basic Codes And Screen Designs
 

Similar to Visual basic coding

Sterling Integrator Map Editor
Sterling Integrator Map EditorSterling Integrator Map Editor
Sterling Integrator Map EditorJeyhind M
 
UNIT-II VISUAL BASIC.NET | BCA
UNIT-II VISUAL BASIC.NET | BCAUNIT-II VISUAL BASIC.NET | BCA
UNIT-II VISUAL BASIC.NET | BCARaj vardhan
 
Visual Basic Fundamentals
Visual Basic FundamentalsVisual Basic Fundamentals
Visual Basic FundamentalsDivyaR219113
 
Chapter 1 number and code system sss
Chapter 1 number and code system sssChapter 1 number and code system sss
Chapter 1 number and code system sssBaia Salihin
 
Visual basic intoduction
Visual basic intoductionVisual basic intoduction
Visual basic intoductionSpy Seat
 
CHAPTER-2.ppt
CHAPTER-2.pptCHAPTER-2.ppt
CHAPTER-2.pptTekle12
 
mis for IT.pptx
mis for IT.pptxmis for IT.pptx
mis for IT.pptxkaiwanak
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptxbmangesh
 
Float Data Type in C.pdf
Float Data Type in C.pdfFloat Data Type in C.pdf
Float Data Type in C.pdfSudhanshiBakre1
 
Visual Basics for Application
Visual Basics for Application Visual Basics for Application
Visual Basics for Application Raghu nath
 
Learning VB.NET Programming Concepts
Learning VB.NET Programming ConceptsLearning VB.NET Programming Concepts
Learning VB.NET Programming Conceptsguest25d6e3
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...jmicro
 
02slide_accessible.pptx
02slide_accessible.pptx02slide_accessible.pptx
02slide_accessible.pptxMattMarino13
 
Unit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programmingUnit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programmingAbha Damani
 
Assignment DetailsYou have learned that some markets are compet.docx
Assignment DetailsYou have learned that some markets are compet.docxAssignment DetailsYou have learned that some markets are compet.docx
Assignment DetailsYou have learned that some markets are compet.docxfaithxdunce63732
 

Similar to Visual basic coding (20)

Sterling Integrator Map Editor
Sterling Integrator Map EditorSterling Integrator Map Editor
Sterling Integrator Map Editor
 
UNIT-II VISUAL BASIC.NET | BCA
UNIT-II VISUAL BASIC.NET | BCAUNIT-II VISUAL BASIC.NET | BCA
UNIT-II VISUAL BASIC.NET | BCA
 
Visual Basic Fundamentals
Visual Basic FundamentalsVisual Basic Fundamentals
Visual Basic Fundamentals
 
Chapter 1 number and code system sss
Chapter 1 number and code system sssChapter 1 number and code system sss
Chapter 1 number and code system sss
 
Chapter 2.datatypes and operators
Chapter 2.datatypes and operatorsChapter 2.datatypes and operators
Chapter 2.datatypes and operators
 
Visual basic intoduction
Visual basic intoductionVisual basic intoduction
Visual basic intoduction
 
CHAPTER-2.ppt
CHAPTER-2.pptCHAPTER-2.ppt
CHAPTER-2.ppt
 
mis for IT.pptx
mis for IT.pptxmis for IT.pptx
mis for IT.pptx
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptx
 
Float Data Type in C.pdf
Float Data Type in C.pdfFloat Data Type in C.pdf
Float Data Type in C.pdf
 
INTRODUCTION TO C
INTRODUCTION TO CINTRODUCTION TO C
INTRODUCTION TO C
 
Visual Basics for Application
Visual Basics for Application Visual Basics for Application
Visual Basics for Application
 
Learning VB.NET Programming Concepts
Learning VB.NET Programming ConceptsLearning VB.NET Programming Concepts
Learning VB.NET Programming Concepts
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
DESIGN OF DOUBLE PRECISION FLOATING POINT MULTIPLICATION ALGORITHM WITH VECTO...
 
02slide_accessible.pptx
02slide_accessible.pptx02slide_accessible.pptx
02slide_accessible.pptx
 
C++
C++C++
C++
 
Unit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programmingUnit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programming
 
Csc 2313 (lecture 3)
Csc 2313 (lecture 3)Csc 2313 (lecture 3)
Csc 2313 (lecture 3)
 
Assignment DetailsYou have learned that some markets are compet.docx
Assignment DetailsYou have learned that some markets are compet.docxAssignment DetailsYou have learned that some markets are compet.docx
Assignment DetailsYou have learned that some markets are compet.docx
 

More from Sara Corpuz

Title, heading and paragraph tags
Title, heading and paragraph tagsTitle, heading and paragraph tags
Title, heading and paragraph tagsSara Corpuz
 
Creating your 1st html page
Creating your 1st html pageCreating your 1st html page
Creating your 1st html pageSara Corpuz
 
Program logic formulation
Program logic formulationProgram logic formulation
Program logic formulationSara Corpuz
 
Flowcharting and pseudocoding
Flowcharting and pseudocodingFlowcharting and pseudocoding
Flowcharting and pseudocodingSara Corpuz
 
Working with visual basic applications
Working with visual basic applicationsWorking with visual basic applications
Working with visual basic applicationsSara Corpuz
 
Building visual basic application
Building visual basic applicationBuilding visual basic application
Building visual basic applicationSara Corpuz
 
Working with comparison operators
Working with comparison operatorsWorking with comparison operators
Working with comparison operatorsSara Corpuz
 

More from Sara Corpuz (9)

Title, heading and paragraph tags
Title, heading and paragraph tagsTitle, heading and paragraph tags
Title, heading and paragraph tags
 
Creating your 1st html page
Creating your 1st html pageCreating your 1st html page
Creating your 1st html page
 
Program logic formulation
Program logic formulationProgram logic formulation
Program logic formulation
 
Flowcharting and pseudocoding
Flowcharting and pseudocodingFlowcharting and pseudocoding
Flowcharting and pseudocoding
 
Working with visual basic applications
Working with visual basic applicationsWorking with visual basic applications
Working with visual basic applications
 
Building visual basic application
Building visual basic applicationBuilding visual basic application
Building visual basic application
 
Visual basic
Visual basicVisual basic
Visual basic
 
Logic
LogicLogic
Logic
 
Working with comparison operators
Working with comparison operatorsWorking with comparison operators
Working with comparison operators
 

Recently uploaded

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Recently uploaded (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

Visual basic coding

  • 2. Code for Visual Basic There are many sources of code within the Visual Basic documentation set. This topic helps you get started in locating that code. Note that some of this code is contained within topics that provide further explanation or instructions on how to perform a task, whereas some is contained in special topics devoted only to displaying a code example.
  • 3. Visual Basic applications usually consist of the following: 1.Forms-an application may consits of one or more forms. 2.Form controls-forms are created with controls. 3.Code-programming language that will direct application execution.
  • 4. * Input and output-are terms used to describe the method of receiving data and sending data from the computer to the user. *Form module-a module file that holds one or more forms. *Standard module-a file that holds code that is not related to a form. *String-a series of characters that is treated as a single entity.
  • 10. Data types The three broad categories of data in Visual Basic. 1.numeric-for numbers used in data 2.string-for alphanumeric data 3.special-for special data type including items that check box values
  • 11. VISUAL Description BASIC DATA and range TYPES Data type that takes one of two BOOLEAN of the following values true or false. Numeric values BYTE without decimals from 0 to 255
  • 12. Here's a simple Visual Basic form. It looks just like any other form that you use in Windows applications. The header area has a caption, the control menu, and the minimize/ma Holds tdate and time values from 0:00:00(midnight) on DATE january 1, 0001 through 11:59:59 PM on december 31, 9999 That represents Decimal numbers with 28 decimal places Numeric values from - Double 1.79769313486232E+308 To 1.79769313486232E+308.
  • 13. NUMERIC VALUES INTEGER WITH NO DECIMAL POINT FROM -32,768 TO 32,767 THE INTEGER DATA VALUES LONG FROM-2,147,483,647 SPECIAL DATA TYPE OBJECT THT HOLDS CONTROLS AND FORMS. SINGLE NUMERIC VALUES FROM - 3.402823E+38 TO 3.402823E+38.
  • 14. THE DIM STATEMENTS LOCATION Dim that appears in an event procedure and can only be used within that event procedure called a Local variable.Dim in a module’s general section that can access all the variables within that module is called Global variable.
  • 15. The Dim statement is usually written in the following format: *Dim VarName As DataType *VarName is a variable name that you create .
  • 16. Prefix Data type example Bln Boolean blnlsOverTime Byt Byte bytAge Cur Currency curHourlyPay Dtm Date dteFirstBegan Dbl Double dblMicroMeasurement
  • 17. Int Integer ingCount Lng Long lngStarDistance Obj Object objSoundClip Sng Single sngYearSales Str String strLastName Vnt or var Variant vntControlValue
  • 18. Take note of the following code: curNetSales =curGrissSales - curCostOfSales intResult = (1 + 2 ) * 3
  • 19. Working with scientific notation Scientific notation is used to represent extremely large and small decimal numbers without including a lot of zeros or other digits.
  • 20. To convert a scientific notation value to its real value: 1.After the D or E ,raise 10 to the number.for example,the +6 in the number 1.2345E+6 raise 10 to the 6th power to get 1,000,000. 2.Multiply the number at the left of the D or E by the value in step 1.Multiply 1.2345 by the 1,000,000 to get a result of 1,234,500.
  • 21. Variables that hold data To hold data that can change based on calculations or the changes can be stated within the application,variables must be declared. The Dim statement lets you recognize that the variables holds the Currency data type and The curToTalSales is the variable’s name.
  • 22. Expressions and math operators Math operators allow calculation and assignment of expression results to variables when you code assignment statements that contain expressions.
  • 23. Visual basic primary math operators Operator Description + Adds two values Subtracts one - value from another value
  • 24. * Multiplies two values / Divides one value by another value Raises a value ^ to a power Concatenates & (or +) two strings
  • 25. Concatenation The concatenation operator joins one string to the end of another.
  • 26. Take note of the following code: strFullName = lblFirstName & “ “ & lblLastName