SlideShare ist ein Scribd-Unternehmen logo
1 von 26
CODING
Private Sub Command1_Click()

Frame1.Visible = True
Text7.Text = Text1.Text
Text8.Text = Text2.Text
Text9.Text = Text3.Text
Text10.Text = Text4.Text
Text11.Text = Text5.Text
Text12.Text = Text6.Text


End Sub

Private Sub Command2_Click()
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Text6.Text = " "
Text7.Text = " "
Text8.Text = " "
Text9.Text = " "
Text10.Text = " "
Text11.Text = " "
Text12.Text = " "


End Sub

Private Sub Command3_Click()
End
End Sub
Private Sub text6_change()
Text1.Text = (Text7.Text)
End Sub
CODING

Private Sub Check1_Click()
If Check1.Enabled = True Then
frame3.Visible = True
End If

End Sub

Private Sub Command1_Click()
MsgBox ("successfully registered")
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Check1.Value = False
Check2.Value = False
Check3.Value = False
Check4.Value = False
Check5.Value = False
Check6.Value = False
Check7.Value = False
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Option6_Click()
If Option6.Value = True Then
Frame1.Visible = True
Frame2.Visible = False
End If
End Sub

Private Sub Option7_Click()
If Option7.Value = True Then
Frame1.Visible = False
Frame2.Visible = True
End If

End Sub
Dim AMT As Integer
Dim TOTALAMT As Integer

Private Sub Command1_Click()
AMT = PRICE.Text * QUANTITY.Text
TOTALAMT = AMT - (0.15 * AMT)
AMOUNT.Text = AMT
DISCOUNT.Text = TOTALAMT

End Sub

Private Sub Command2_Click()
BOOK_TITLE.Text = ""
PRICE.Text = ""
QUANTITY.Text = ""
AMOUNT.Text = ""
DISCOUNT.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub
Dim reading, a As Double

Private Sub Command1_Click()
reading = Val(Text7.Text) - Val(Text6.Text)
a = (Val(Text8.Text) * 15) + (reading * 0.5)
Text9.Text = reading
Text10.Text = a
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub
Private Sub Command1_Click()
Text5.Text = 900 + (Text2.Text)
Text6.Text = Text5.Text * 0.18
Text7.Text = Text5.Text - Text6.Text
Text8.Text = Text7.Text * 0.3
Text9.Text = Text7.Text * 0.15
Text3.Text = Text7.Text * 0.5
Text4.Text = Text7.Text * 0.05
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Command1_Click()
If Combo1.Text = "" Then
MsgBox ("enter a valid name")
Else
Combo1.AddItem Combo1.Text
End If
End Sub

Private Sub Command2_Click()
Combo1.RemoveItem Combo1.ListIndex
End Sub

Private Sub Command3_Click()
MsgBox "all items will be deleted"
Combo1.Clear

End Sub
Private Sub Command4_Click()
MsgBox ("you have choosen" & Combo1.Text)
End Sub

Private Sub Command5_Click()
End
End Sub
Private Sub Form_Load()
List1.AddItem "NOIDA"
List1.AddItem "DELHI"
List1.AddItem "GURGAON"
List1.AddItem "GREATER NOIDA"
List1.AddItem "FARIDABAD"
End Sub
Private Sub List1_Click()
If List1.ListIndex = 0 Then
Label4.Caption = "spice cinemas:"
Label5.Caption = "TMK"

ElseIf List1.ListIndex = 1 Then
Label4.Caption = "olsen:"
Label5.Caption = "action replay"

ElseIf List1.ListIndex = 2 Then
Label4.Caption = "TGIP:"
Label5.Caption = "GOLMAAL 3"

ElseIf List1.ListIndex = 3 Then
Label4.Caption = "CSM:"
Label5.Caption = "BREAK KE BAAD"

ElseIf List1.ListIndex = 4 Then
Label4.Caption = "PVR SAKET:"
Label5.Caption = "GUZAARISH"
End If
End Sub
Private Sub Command1_Click()
Label3.Caption = Text1.Text
Label4.Caption = Text2.Text
Label5.Caption = List1.Text
Label6.Caption = combo1.Text

End Sub


Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Label3.Caption = ""
Label4.Caption = ""
Label5.Caption = ""
Label6.Caption = ""

End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Form_Load()
List1.AddItem "computer"
List1.AddItem "business"
List1.AddItem "humanities"
List1.AddItem "Commerce"
List1.AddItem "Medical"
List1.AddItem "Engineering"
combo1.AddItem "ABC"
combo1.AddItem "Amity"

End Sub
10.




Public Function fib(n As Integer) As Integer

If n = 1 Then
fib = 0


ElseIf n = 2 Then
fib = 1

Else

fib = fib(n - 1) + fib(n - 2)

End If
End Function
Private Sub Command1_Click()
Dim n As Integer
Dim fibo As Integer
n = Val(Text1.Text)
fibo = fib(n)
Text2.Text = fibo

End Sub

Private Sub Command2_Click()

Text1.Text = ""
Text2.Text = ""

End Sub

Private Sub Command3_Click()
End
End Sub
11.WAP ,using recursive function to calculate Nth Fibonacci Series.




Private Sub Command2_Click()
Dim n, i, sum, r As Double
Dim rev As Double
sum = 0
n = Text1.Text
While n <> 0
r = n Mod 10
rev = (rev * 10) + r
n = n  10
sum = sum + r
Wend

Text2.Text = sum
Text3.Text = rev


End Sub
Private Sub Command3_Click()
End

End Sub

Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""

End Sub
13.WAP ,using recursive function to calculate GCD of a number .




Private Sub Command1_Click()
Dim n As Integer
Dim p As Integer
Dim i As Integer
Dim result As Integer
result = 1
n = Text1.Text
p = Text2.Text
For i = 1 To p Step 1
result = result * n
Next i
Text3.Text = result
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Form2.Cls
End Sub
Private Sub Command3_Click()
End
End Sub
14.WAP to division of two numbers. Also shows divide by zero error .




Private Sub Command1_Click()

Dim a, b, remainder, quotient As Double
a = Val(Text1.Text)
b = Val(Text2.Text)

If b = 0 Then
MsgBox ("invalid divisor")

Else

quotient = a / b
remainder = a Mod b
Text3.Text = quotient
End If


If remainder = 0 Then
MsgBox ("there is no reminder")
Text4.Text = remainder
Else
Text4.Text = remainder
End If


End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
label5.Caption = ""
label6.Caption = ""

End Sub

Private Sub Command3_Click()
End
End Sub
15. WAP to check whether a given number is prime or not .




Private Sub Label2_Click()
End Sub

Dim a, b, c As Integer
Private Sub Command1_Click()
a = Val(Text1.Text)
b=0
For i = 1 To a Step 1
c = a Mod i

If c = 0 Then
b=b+1
End If

Next i
If b = 2 Then
MsgBox ("no. is prime")

End If

End Sub

Private Sub Command2_Click()
Text1.Text = ""

End Sub
Private Sub Command3_Click()
End
End Sub
16.WAP to generate first 10 prime number .




Private Sub Command1_Click()
Dim i As Integer
Dim j As Integer
Dim num As Integer
Dim cnt As Integer

i=0
j=0
cnt = 0
num = Val(Text1.Text)
While j < 10
For i = 1 To num
If num Mod i = 0 Then
cnt = cnt + 1
End If
Next i
If cnt = 2 Then
j=j+1
List1.AddItem j & ") " & num
End If

cnt = 0
num = num + 1
Wend
End Sub

Private Sub Command2_Click()
Text1.Text = ""
List1.Clear
End Sub

Private Sub Command3_Click()
End

End Sub
17.WAP to check wether a given string is palindrome or not .




Private Sub Command1_Click()

Dim a As String
Dim b As String
a = Text1.Text
b = StrReverse(a)
If a = b Then
MsgBox ("That is a palindrome!")
Else
MsgBox ("No, it is not a palindrome!")
End If
End Sub

Private Sub Command2_Click()
Text1.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub
18.WAP to swap two numbers by :
a)Call by value
b)Call by reference




Private Function swap(ByVal a As Integer, ByVal b As Integer) As Integer
c=a
a=b
b=c
End Function
Private Function swapref(ByRef a As Integer, ByRef b As Integer) As Integer
c=a
a=b
b=c
End Function


Private Sub Command2_Click()
a = Val(Text1.Text)
b = Val(Text2.Text)
Call swap(a, b)

Label3.Caption = a
Label4.Caption = b
End Sub
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer

a = Val(Text1.Text)
b = Val(Text2.Text)
Call swapref(a, b)

Label3.Caption = a
Label4.Caption = b
End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Label3.Caption = ""
Label4.Caption = ""
End Sub

Private Sub Command4_Click()
End
End Sub
21. WAP to check wether the given string is in upper case or lower case and also convert
it’s case .




Private Sub Command1_Click()
Dim STR As String
STR = Val(Text1.Text)
If Text1.Text = UCase(Text1.Text) Then
MsgBox ("IT IS IN UPPERCASE")
End If
If Text1.Text = LCase(Text1.Text) Then
MsgBox ("IT IS IN LOWER CASE")
End If

End Sub

Private Sub Command2_Click()
If Text1.Text = UCase(Text1.Text) Then
Text1.Text = LCase(Text1.Text)
End If
End Sub

Private Sub Command3_Click()
Text1.Text = ""
End Sub

Private Sub Command4_Click()
End
End Sub
Vb file

Weitere ähnliche Inhalte

Was ist angesagt?

The Ring programming language version 1.9 book - Part 7 of 210
The Ring programming language version 1.9 book - Part 7 of 210The Ring programming language version 1.9 book - Part 7 of 210
The Ring programming language version 1.9 book - Part 7 of 210Mahmoud Samir Fayed
 
Binary Search Program in Visual Basic 2008
Binary Search Program in Visual Basic 2008Binary Search Program in Visual Basic 2008
Binary Search Program in Visual Basic 2008atsumagaysay
 
Lampiran source code
Lampiran source codeLampiran source code
Lampiran source codeancunk
 
Linear Search Program in Visual Basic 2008
Linear Search Program in Visual Basic 2008Linear Search Program in Visual Basic 2008
Linear Search Program in Visual Basic 2008atsumagaysay
 
Regexes and-performance-testing
Regexes and-performance-testingRegexes and-performance-testing
Regexes and-performance-testingdoughellmann
 
Bhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third YearBhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third YearDezyneecole
 
Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...
Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...
Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...Philip Schwarz
 
Dialog box in vb6
Dialog box in vb6Dialog box in vb6
Dialog box in vb6Saroj Patel
 
EventMachine for RubyFuZa 2012
EventMachine for RubyFuZa   2012EventMachine for RubyFuZa   2012
EventMachine for RubyFuZa 2012Christopher Spring
 
Putting dialog boxes to work
Putting dialog boxes to workPutting dialog boxes to work
Putting dialog boxes to workchunky.sarath
 

Was ist angesagt? (20)

The Ring programming language version 1.9 book - Part 7 of 210
The Ring programming language version 1.9 book - Part 7 of 210The Ring programming language version 1.9 book - Part 7 of 210
The Ring programming language version 1.9 book - Part 7 of 210
 
Binary Search Program in Visual Basic 2008
Binary Search Program in Visual Basic 2008Binary Search Program in Visual Basic 2008
Binary Search Program in Visual Basic 2008
 
Lampiran source code
Lampiran source codeLampiran source code
Lampiran source code
 
Linear Search Program in Visual Basic 2008
Linear Search Program in Visual Basic 2008Linear Search Program in Visual Basic 2008
Linear Search Program in Visual Basic 2008
 
Vp lecture 2 ararat
Vp lecture 2 araratVp lecture 2 ararat
Vp lecture 2 ararat
 
Regexes and-performance-testing
Regexes and-performance-testingRegexes and-performance-testing
Regexes and-performance-testing
 
Go &lt;-> Ruby
Go &lt;-> RubyGo &lt;-> Ruby
Go &lt;-> Ruby
 
VB 6
VB 6VB 6
VB 6
 
Bhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third YearBhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third Year
 
Ditec esoft C# project
Ditec esoft C# projectDitec esoft C# project
Ditec esoft C# project
 
Ditec esoft C# project
Ditec esoft C# project Ditec esoft C# project
Ditec esoft C# project
 
Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...
Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...
Refactoring: A First Example - Martin Fowler’s First Example of Refactoring, ...
 
Eclipse Banking Day
Eclipse Banking DayEclipse Banking Day
Eclipse Banking Day
 
Python review2
Python review2Python review2
Python review2
 
Dialog box in vb6
Dialog box in vb6Dialog box in vb6
Dialog box in vb6
 
Python review2
Python review2Python review2
Python review2
 
EventMachine for RubyFuZa 2012
EventMachine for RubyFuZa   2012EventMachine for RubyFuZa   2012
EventMachine for RubyFuZa 2012
 
Putting dialog boxes to work
Putting dialog boxes to workPutting dialog boxes to work
Putting dialog boxes to work
 
Steady with ruby
Steady with rubySteady with ruby
Steady with ruby
 
C++ L08-Classes Part1
C++ L08-Classes Part1C++ L08-Classes Part1
C++ L08-Classes Part1
 

Ähnlich wie Vb file

Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Yeardezyneecole
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Yeardezyneecole
 
Harendra Singh,BCA Third Year
Harendra Singh,BCA Third YearHarendra Singh,BCA Third Year
Harendra Singh,BCA Third Yeardezyneecole
 
Sudarshan Joshi , BCA Third Year
Sudarshan Joshi , BCA Third YearSudarshan Joshi , BCA Third Year
Sudarshan Joshi , BCA Third Yeardezyneecole
 
Updated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptxUpdated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptxSarveshDeodhar
 
Vbreport program
Vbreport programVbreport program
Vbreport programdhi her
 
Akshay Sharma , BCA Third Year
Akshay Sharma , BCA Third YearAkshay Sharma , BCA Third Year
Akshay Sharma , BCA Third YearDezyneecole
 
Mithlesh Singh Rawat , BCA Third Year
Mithlesh Singh Rawat , BCA Third YearMithlesh Singh Rawat , BCA Third Year
Mithlesh Singh Rawat , BCA Third Yeardezyneecole
 
Gaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearGaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearDezyneecole
 
Aplikasi rawat-inap-vbnet
Aplikasi rawat-inap-vbnetAplikasi rawat-inap-vbnet
Aplikasi rawat-inap-vbnetDiaz Alfahrezy
 
Codes
CodesCodes
CodesOSit3
 
Vb Project ขั้นเทพ
Vb Project ขั้นเทพVb Project ขั้นเทพ
Vb Project ขั้นเทพSinchai Lanon
 
Calculadora
CalculadoraCalculadora
CalculadoraCBTa 120
 
Ejemplo En Gamabas
Ejemplo En GamabasEjemplo En Gamabas
Ejemplo En Gamabaseduann
 

Ähnlich wie Vb file (20)

Vbreport
VbreportVbreport
Vbreport
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Harendra Singh,BCA Third Year
Harendra Singh,BCA Third YearHarendra Singh,BCA Third Year
Harendra Singh,BCA Third Year
 
Sudarshan Joshi , BCA Third Year
Sudarshan Joshi , BCA Third YearSudarshan Joshi , BCA Third Year
Sudarshan Joshi , BCA Third Year
 
Updated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptxUpdated Visual Basic 6 for beginners.pptx
Updated Visual Basic 6 for beginners.pptx
 
Vbreport program
Vbreport programVbreport program
Vbreport program
 
Akshay Sharma , BCA Third Year
Akshay Sharma , BCA Third YearAkshay Sharma , BCA Third Year
Akshay Sharma , BCA Third Year
 
Mithlesh Singh Rawat , BCA Third Year
Mithlesh Singh Rawat , BCA Third YearMithlesh Singh Rawat , BCA Third Year
Mithlesh Singh Rawat , BCA Third Year
 
Gaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearGaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third Year
 
Vb.net programs
Vb.net programsVb.net programs
Vb.net programs
 
Docimp
DocimpDocimp
Docimp
 
Aplikasi rawat-inap-vbnet
Aplikasi rawat-inap-vbnetAplikasi rawat-inap-vbnet
Aplikasi rawat-inap-vbnet
 
Codes
CodesCodes
Codes
 
Programming
ProgrammingProgramming
Programming
 
Richtextbox
RichtextboxRichtextbox
Richtextbox
 
Vb Project ขั้นเทพ
Vb Project ขั้นเทพVb Project ขั้นเทพ
Vb Project ขั้นเทพ
 
Area de un triangulo
Area de un trianguloArea de un triangulo
Area de un triangulo
 
Calculadora
CalculadoraCalculadora
Calculadora
 
Ejemplo En Gamabas
Ejemplo En GamabasEjemplo En Gamabas
Ejemplo En Gamabas
 

Mehr von Mukund Trivedi

Mehr von Mukund Trivedi (20)

System development life cycle (sdlc)
System development life cycle (sdlc)System development life cycle (sdlc)
System development life cycle (sdlc)
 
Process of design
Process of designProcess of design
Process of design
 
New file and form 2
New file and form 2New file and form 2
New file and form 2
 
File organisation
File organisationFile organisation
File organisation
 
Evaluation
EvaluationEvaluation
Evaluation
 
Database
DatabaseDatabase
Database
 
Case tools
Case toolsCase tools
Case tools
 
Evaluation
EvaluationEvaluation
Evaluation
 
Dfd final
Dfd finalDfd final
Dfd final
 
Sad
SadSad
Sad
 
C++ file
C++ fileC++ file
C++ file
 
Ff40fnatural resources (1)
Ff40fnatural resources (1)Ff40fnatural resources (1)
Ff40fnatural resources (1)
 
Ff40fnatural resources
Ff40fnatural resourcesFf40fnatural resources
Ff40fnatural resources
 
F58fbnatural resources 2 (1)
F58fbnatural resources 2 (1)F58fbnatural resources 2 (1)
F58fbnatural resources 2 (1)
 
F58fbnatural resources 2
F58fbnatural resources 2F58fbnatural resources 2
F58fbnatural resources 2
 
F6dc1 session6 c++
F6dc1 session6 c++F6dc1 session6 c++
F6dc1 session6 c++
 
Ee2fbunit 7
Ee2fbunit 7Ee2fbunit 7
Ee2fbunit 7
 
E212d9a797dbms chapter3 b.sc2 (2)
E212d9a797dbms chapter3 b.sc2 (2)E212d9a797dbms chapter3 b.sc2 (2)
E212d9a797dbms chapter3 b.sc2 (2)
 
E212d9a797dbms chapter3 b.sc2 (1)
E212d9a797dbms chapter3 b.sc2 (1)E212d9a797dbms chapter3 b.sc2 (1)
E212d9a797dbms chapter3 b.sc2 (1)
 
E212d9a797dbms chapter3 b.sc2
E212d9a797dbms chapter3 b.sc2E212d9a797dbms chapter3 b.sc2
E212d9a797dbms chapter3 b.sc2
 

Kürzlich hochgeladen

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
"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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
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
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 

Kürzlich hochgeladen (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
"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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 

Vb file

  • 1.
  • 2. CODING Private Sub Command1_Click() Frame1.Visible = True Text7.Text = Text1.Text Text8.Text = Text2.Text Text9.Text = Text3.Text Text10.Text = Text4.Text Text11.Text = Text5.Text Text12.Text = Text6.Text End Sub Private Sub Command2_Click() Text1.Text = " " Text2.Text = " " Text3.Text = " " Text4.Text = " " Text5.Text = " " Text6.Text = " " Text7.Text = " " Text8.Text = " " Text9.Text = " " Text10.Text = " " Text11.Text = " " Text12.Text = " " End Sub Private Sub Command3_Click() End End Sub Private Sub text6_change() Text1.Text = (Text7.Text) End Sub
  • 3.
  • 4. CODING Private Sub Check1_Click() If Check1.Enabled = True Then frame3.Visible = True End If End Sub Private Sub Command1_Click() MsgBox ("successfully registered") End Sub Private Sub Command2_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Check1.Value = False Check2.Value = False Check3.Value = False Check4.Value = False Check5.Value = False Check6.Value = False Check7.Value = False End Sub Private Sub Command3_Click() End End Sub Private Sub Option6_Click() If Option6.Value = True Then Frame1.Visible = True Frame2.Visible = False End If End Sub Private Sub Option7_Click() If Option7.Value = True Then Frame1.Visible = False Frame2.Visible = True End If End Sub
  • 5. Dim AMT As Integer Dim TOTALAMT As Integer Private Sub Command1_Click() AMT = PRICE.Text * QUANTITY.Text TOTALAMT = AMT - (0.15 * AMT) AMOUNT.Text = AMT DISCOUNT.Text = TOTALAMT End Sub Private Sub Command2_Click() BOOK_TITLE.Text = "" PRICE.Text = "" QUANTITY.Text = "" AMOUNT.Text = "" DISCOUNT.Text = "" End Sub Private Sub Command3_Click() End End Sub
  • 6. Dim reading, a As Double Private Sub Command1_Click() reading = Val(Text7.Text) - Val(Text6.Text) a = (Val(Text8.Text) * 15) + (reading * 0.5) Text9.Text = reading Text10.Text = a End Sub Private Sub Command2_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" End Sub Private Sub Command3_Click() End End Sub
  • 7. Private Sub Command1_Click() Text5.Text = 900 + (Text2.Text) Text6.Text = Text5.Text * 0.18 Text7.Text = Text5.Text - Text6.Text Text8.Text = Text7.Text * 0.3 Text9.Text = Text7.Text * 0.15 Text3.Text = Text7.Text * 0.5 Text4.Text = Text7.Text * 0.05 End Sub Private Sub Command2_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" End Sub Private Sub Command3_Click() End End Sub
  • 8. Private Sub Command1_Click() If Combo1.Text = "" Then MsgBox ("enter a valid name") Else Combo1.AddItem Combo1.Text End If End Sub Private Sub Command2_Click() Combo1.RemoveItem Combo1.ListIndex End Sub Private Sub Command3_Click() MsgBox "all items will be deleted" Combo1.Clear End Sub Private Sub Command4_Click() MsgBox ("you have choosen" & Combo1.Text) End Sub Private Sub Command5_Click() End End Sub
  • 9. Private Sub Form_Load() List1.AddItem "NOIDA" List1.AddItem "DELHI" List1.AddItem "GURGAON" List1.AddItem "GREATER NOIDA" List1.AddItem "FARIDABAD" End Sub Private Sub List1_Click() If List1.ListIndex = 0 Then Label4.Caption = "spice cinemas:" Label5.Caption = "TMK" ElseIf List1.ListIndex = 1 Then Label4.Caption = "olsen:" Label5.Caption = "action replay" ElseIf List1.ListIndex = 2 Then Label4.Caption = "TGIP:" Label5.Caption = "GOLMAAL 3" ElseIf List1.ListIndex = 3 Then Label4.Caption = "CSM:" Label5.Caption = "BREAK KE BAAD" ElseIf List1.ListIndex = 4 Then Label4.Caption = "PVR SAKET:" Label5.Caption = "GUZAARISH" End If End Sub
  • 10. Private Sub Command1_Click() Label3.Caption = Text1.Text Label4.Caption = Text2.Text Label5.Caption = List1.Text Label6.Caption = combo1.Text End Sub Private Sub Command2_Click() Text1.Text = "" Text2.Text = "" Label3.Caption = "" Label4.Caption = ""
  • 11. Label5.Caption = "" Label6.Caption = "" End Sub Private Sub Command3_Click() End End Sub Private Sub Form_Load() List1.AddItem "computer" List1.AddItem "business" List1.AddItem "humanities" List1.AddItem "Commerce" List1.AddItem "Medical" List1.AddItem "Engineering" combo1.AddItem "ABC" combo1.AddItem "Amity" End Sub
  • 12. 10. Public Function fib(n As Integer) As Integer If n = 1 Then fib = 0 ElseIf n = 2 Then fib = 1 Else fib = fib(n - 1) + fib(n - 2) End If End Function
  • 13. Private Sub Command1_Click() Dim n As Integer Dim fibo As Integer n = Val(Text1.Text) fibo = fib(n) Text2.Text = fibo End Sub Private Sub Command2_Click() Text1.Text = "" Text2.Text = "" End Sub Private Sub Command3_Click() End End Sub
  • 14. 11.WAP ,using recursive function to calculate Nth Fibonacci Series. Private Sub Command2_Click() Dim n, i, sum, r As Double Dim rev As Double sum = 0 n = Text1.Text While n <> 0 r = n Mod 10 rev = (rev * 10) + r n = n 10 sum = sum + r Wend Text2.Text = sum Text3.Text = rev End Sub
  • 15. Private Sub Command3_Click() End End Sub Private Sub Form_Load() Text1.Text = "" Text2.Text = "" Text3.Text = "" End Sub
  • 16. 13.WAP ,using recursive function to calculate GCD of a number . Private Sub Command1_Click() Dim n As Integer Dim p As Integer Dim i As Integer Dim result As Integer result = 1 n = Text1.Text p = Text2.Text For i = 1 To p Step 1 result = result * n Next i Text3.Text = result End Sub Private Sub Command2_Click() Text1.Text = "" Form2.Cls End Sub Private Sub Command3_Click() End End Sub
  • 17. 14.WAP to division of two numbers. Also shows divide by zero error . Private Sub Command1_Click() Dim a, b, remainder, quotient As Double a = Val(Text1.Text) b = Val(Text2.Text) If b = 0 Then MsgBox ("invalid divisor") Else quotient = a / b remainder = a Mod b Text3.Text = quotient End If If remainder = 0 Then MsgBox ("there is no reminder") Text4.Text = remainder Else Text4.Text = remainder End If End Sub Private Sub Command2_Click()
  • 18. Text1.Text = "" Text2.Text = "" label5.Caption = "" label6.Caption = "" End Sub Private Sub Command3_Click() End End Sub
  • 19. 15. WAP to check whether a given number is prime or not . Private Sub Label2_Click() End Sub Dim a, b, c As Integer Private Sub Command1_Click() a = Val(Text1.Text) b=0 For i = 1 To a Step 1 c = a Mod i If c = 0 Then b=b+1 End If Next i If b = 2 Then MsgBox ("no. is prime") End If End Sub Private Sub Command2_Click() Text1.Text = "" End Sub Private Sub Command3_Click() End End Sub
  • 20. 16.WAP to generate first 10 prime number . Private Sub Command1_Click() Dim i As Integer Dim j As Integer Dim num As Integer Dim cnt As Integer i=0 j=0 cnt = 0 num = Val(Text1.Text) While j < 10 For i = 1 To num If num Mod i = 0 Then cnt = cnt + 1 End If Next i If cnt = 2 Then j=j+1
  • 21. List1.AddItem j & ") " & num End If cnt = 0 num = num + 1 Wend End Sub Private Sub Command2_Click() Text1.Text = "" List1.Clear End Sub Private Sub Command3_Click() End End Sub
  • 22. 17.WAP to check wether a given string is palindrome or not . Private Sub Command1_Click() Dim a As String Dim b As String a = Text1.Text b = StrReverse(a) If a = b Then MsgBox ("That is a palindrome!") Else MsgBox ("No, it is not a palindrome!") End If End Sub Private Sub Command2_Click() Text1.Text = "" End Sub Private Sub Command3_Click() End End Sub
  • 23. 18.WAP to swap two numbers by : a)Call by value b)Call by reference Private Function swap(ByVal a As Integer, ByVal b As Integer) As Integer c=a a=b b=c End Function Private Function swapref(ByRef a As Integer, ByRef b As Integer) As Integer c=a a=b b=c End Function Private Sub Command2_Click() a = Val(Text1.Text) b = Val(Text2.Text) Call swap(a, b) Label3.Caption = a Label4.Caption = b End Sub
  • 24. Private Sub Command1_Click() Dim a As Integer Dim b As Integer a = Val(Text1.Text) b = Val(Text2.Text) Call swapref(a, b) Label3.Caption = a Label4.Caption = b End Sub Private Sub Command3_Click() Text1.Text = "" Text2.Text = "" Label3.Caption = "" Label4.Caption = "" End Sub Private Sub Command4_Click() End End Sub
  • 25. 21. WAP to check wether the given string is in upper case or lower case and also convert it’s case . Private Sub Command1_Click() Dim STR As String STR = Val(Text1.Text) If Text1.Text = UCase(Text1.Text) Then MsgBox ("IT IS IN UPPERCASE") End If If Text1.Text = LCase(Text1.Text) Then MsgBox ("IT IS IN LOWER CASE") End If End Sub Private Sub Command2_Click() If Text1.Text = UCase(Text1.Text) Then Text1.Text = LCase(Text1.Text) End If End Sub Private Sub Command3_Click() Text1.Text = "" End Sub Private Sub Command4_Click() End End Sub