SlideShare a Scribd company logo
1 of 87
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdMessage_Click()
lblMsg.Caption = "Hello and Welcome to the World of
Programming!!!"
End Sub
Private Sub cmdClear_Click()
txtNum1.Text = ""
txtNum2.Text = ""
txtNum3.Text = ""
txtNum4.Text = ""
txtNum1.SetFocus
End Sub
Private Sub cmdExchange_Click()
Dim Temp As Integer
Dim A, B As Integer
A = Val(txtNum1.Text)
B = Val(txtNum2.Text)
Temp = A
A = B
B = Temp
txtNum3.Text = A
txtNum4.Text = B
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdAverage_Click()
Dim A, B, C As Integer
Dim avg As Single
A = Val(txtMks1.Text)
B = Val(txtMks2.Text)
C = Val(txtMks3.Text)
avg = (A + B + C) / 3
txtAverage.Text = FormatNumber(avg, 2)
End Sub
Private Sub cmdClear_Click()
txtMks1.Text = ""
txtMks2.Text = ""
txtMks3.Text = ""
txtAverage.Text = ""
txtMks1.SetFocus
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdCalculate_Click()
Dim P, N, R, I, Total As Single
P = Val(txtPrincipal.Text)
N = Val(txtYears.Text)
R = Val(txtRate.Text)
I = P * N * R / 100
txtInterest.Text = FormatCurrency(I, 2)
txtTotal.Text = FormatCurrency(P + I, 2)
End Sub
Private Sub cmdClear_Click()
txtPrincipal.Text = ""
txtYears.Text = ""
txtRate.Text = ""
txtInterest.Text = ""
txtTotal.Text = ""
txtPrincipal.SetFocus
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdShow_Click()
If optCommerce.Value = True Then
lblFaculty.Caption = "You selected" & " Commerce " & "Faculty "
ElseIf optArts.Value = True Then
lblFaculty.Caption = "You selected" & " Arts " & " Faculty "
ElseIf optScience.Value = True Then
lblFaculty.Caption = "You selected" & " Science " & " Faculty "
End If
End Sub
Private Sub Form_Load()
optCommerce.Value = False
optArts.Value = False
optScience.Value = False
End Sub
Private Sub cmdClear_Click()
txtNum1.Text = ""
txtNum2.Text = ""
txtNum3.Text = ""
txtNum1.SetFocus
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdMax_Click()
Dim A, B, C, Max As Integer
A = Val(txtNum1.Text)
B = Val(txtNum2.Text)
C = Val(txtNum3.Text)
'first find the larger of A and B
If A > B Then
Max = A
Else
Max = B
End If
If C > Max Then
Max = C
End If
MsgBox "Largest Number is " & Max, vbOKOnly,
"Maximum Number"
End Sub
Private Sub cmdCheck_Click()
Dim N As Integer
N = Val(txtNum.Text)
If N Mod 2 = 0 Then
MsgBox "Number entered is Even", vbOKOnly, "Message Box"
Else
MsgBox "Number entered is Odd", vbOKOnly, "Message Box"
End If
End Sub
Private Sub cmdClear_Click()
txtNum.Text = ""
txtNum.SetFocus
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdCheck_Click()
Dim N As Integer
N = Val(txtNum.Text)
If N > 0 Then
MsgBox "Number entered is Positive", vbOKOnly, "Message Box"
ElseIf N < 0 Then
MsgBox "Number entered is Negative", vbOKOnly, "Message Box"
Else
MsgBox "Number entered is neither Positive nor Negative",
vbOKOnly, "Message Box"
End If
End Sub
Private Sub cmdClear_Click()
txtNum.Text = ""
txtNum.SetFocus
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdCalculate_Click()
Dim I, N, Fact As Integer
Fact = 1
N = Val(txtNum.Text)
For I = 1 To N
Fact = Fact * I
Next I
MsgBox "Factorial of entered number =" & Fact, vbOKOnly,
"Message Box"
End Sub
Private Sub cmdClear_Click()
txtNum.Text = ""
txtNum.SetFocus
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdCalculate_Click()
Dim I, N, Sum As Integer
Sum = 0
N = Val(txtNum.Text)
For I = 1 To N
Sum = Sum + I
Next I
MsgBox "Sum of entered number =" & Sum, vbOKOnly,
"Message Box"
End Sub
Private Sub cmdClear_Click()
txtNum.Text = ""
txtNum.SetFocus
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdCalculate_Click()
Dim s As Integer
Dim i As Integer
Print "S = 22 + 24 + 26 +......+ 100" & vbCrLf & vbCrLf ;
s = 0
For i = 22 To 100 Step 2
s = s + i
Next i
Print "Sum is"; s
End Sub
Private Sub cmdexit_Click()
End
End Sub
Private Sub cmdCalculate_Click()
Dim i As Integer
Dim s As Integer
Print "Series is 10 20 30 ..... 120" & vbCrLf & vbCrLf;
s = 0
For i = 10 To 120 Step 10
s = s + i
Next i
Print "Sum is"; s
End Sub
Private Sub cmdexit_Click()
End
End Sub
Private Sub cmdcalculate_Click()
Dim I, A, T As Integer
I = 1
A = Val(txtnum.Text)
lblprint.Caption = "Table of" & Str(A) & Chr(13)
For I = 1 To 10
T = I * A
lblprint.Caption = lblprint.Caption & Str(A) & "X" & Str(I) &
"=" & Str(T) & Chr(13)
Next I
End Sub
Private Sub cmdclear_Click()
txtnum.Text = ""
lblprint.Caption = ""
End Sub
Private Sub cmdexit_Click()
End
End Sub
Private Sub cmdexit_Click()
End
End Sub
Private Sub cmdclear_Click()
Shape1.Visible() = False
Shape2.Visible() = False
Shape3.Visible() = False
End Sub
Private Sub cmdcircle_Click()
Shape1.Visible() = True
End Sub
Private Sub cmdrectangle_Click()
Shape2.Visible() = True
End Sub
Private Sub cmdsquare_Click()
Shape3.Visible() = True
End Sub
Private Sub cmdage_Click()
Dim age As Single
age = DatePart("yyyy", Now) - DatePart("yyyy", CDate(txtdob))
lbl4.Caption = "Age in Years" & Str(age)
End Sub
Private Sub cmdclear_Click()
txtdob.Text = ""
txtdoj.Text = ""
End Sub
Private Sub optblue_Click()
txtenter.ForeColor = vbBlue
End Sub
Private Sub optcenter_Click()
txtenter.Alignment = 2
End Sub
Private Sub optgreen_Click()
txtenter.ForeColor = vbGreen
End Sub
Private Sub optleft_Click()
txtenter.Alignment = 1
End Sub
Private Sub optred_Click()
txtenter.ForeColor = vbRed
End Sub
Private Sub optright_Click()
txtenter.Alignment = 0
End Sub
Private Sub txtenter_Change()
txtenter.FontBold = True
End Sub
Private Sub lstname_Click()
txtmsg.FontName = lstname()
End Sub
Private Sub lstsize_Click()
txtmsg.FontSize = lstsize()
End Sub
Updated Visual Basic 6 for beginners.pptx

More Related Content

Similar to Updated Visual Basic 6 for beginners.pptx

Visual Basic
Visual BasicVisual Basic
Visual BasicVj NiroSh
 
Codes
CodesCodes
CodesOSit3
 
SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)Darwin Durand
 
Programas Gambas
Programas GambasProgramas Gambas
Programas GambasRZYMJ
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subirguest9da3a3
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subirguest9da3a3
 
Ejemplo En Gamabas
Ejemplo En GamabasEjemplo En Gamabas
Ejemplo En Gamabaseduann
 
Programas Gambas
Programas GambasProgramas Gambas
Programas GambasRZYMJ
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambasguestdd103d
 
ejemplos gambas
ejemplos gambasejemplos gambas
ejemplos gambaseduann
 
Burger doll order form
Burger doll order formBurger doll order form
Burger doll order formKhairi Aiman
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subirguest9da3a3
 

Similar to Updated Visual Basic 6 for beginners.pptx (20)

Visual Basic
Visual BasicVisual Basic
Visual Basic
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambas
 
Stop watch and array
Stop watch and arrayStop watch and array
Stop watch and array
 
Gambas
GambasGambas
Gambas
 
Codes
CodesCodes
Codes
 
SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)SISTEMA DE FACTURACION (Ejemplo desarrollado)
SISTEMA DE FACTURACION (Ejemplo desarrollado)
 
Gambas
Gambas Gambas
Gambas
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambas
 
Manual De Gambas
Manual De GambasManual De Gambas
Manual De Gambas
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subir
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subir
 
Ejemplo En Gamabas
Ejemplo En GamabasEjemplo En Gamabas
Ejemplo En Gamabas
 
UtilityCostCalcCode
UtilityCostCalcCodeUtilityCostCalcCode
UtilityCostCalcCode
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambas
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambas
 
Rumus VB-1
Rumus VB-1Rumus VB-1
Rumus VB-1
 
ejemplos gambas
ejemplos gambasejemplos gambas
ejemplos gambas
 
ملخص البرمجة المرئية - الوحدة الرابعة
ملخص البرمجة المرئية - الوحدة الرابعةملخص البرمجة المرئية - الوحدة الرابعة
ملخص البرمجة المرئية - الوحدة الرابعة
 
Burger doll order form
Burger doll order formBurger doll order form
Burger doll order form
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subir
 

Recently uploaded

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 

Recently uploaded (20)

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 

Updated Visual Basic 6 for beginners.pptx