SlideShare una empresa de Scribd logo
1 de 33
Program 1
Printing Series
        Code


Private Sub Form_Click()
For k = 1 To 5
Print k
Next
End Sub


        Output




                                       1|Page
Program 2


        Printing Triangle Series

            Code


Private Sub Form_Click()
For r = 1 To 5
For c = 1 To r
Print c;
Next
Print
Next
End Sub


    Output




                                         2|Page
Program 3


Printing Reverse triangle series
         Code
    Private Sub Form_Click()
     For r = 5 To 1 Step -1
      For c = 1 To r
      Print c;
      Next
      Print
      Next
      End Sub


         Output




                                   3|Page
Program 4
Multiply Two Numbers
        Code
Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub


        Output




                                                 4|Page
Program 5
Printing Pyramid Series
            Code
Private Sub Form_Click()
For r = 1 To 5
For k = 4 To r Step -1
Print "    ";
Next
For c = 1 To r
Print c;
Next
For d = r - 1 To 1 Step -1
Print d;
Next
Print
Next
End Sub




                                     5|Page
 Output




           6|Page
Program 6


Simple Calculator
         Code
Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub


Private Sub Command2_Click()
Text3.Text = Val(Text1.Text) - Val(Text2.Text)
End Sub


Private Sub Command3_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub


Private Sub Command4_Click()
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
End Sub




                                                 7|Page
 Output




           8|Page
Program 7


Timer Control
          Code
Private Sub Timer1_Timer()
Command1.Left = Command1.Left + 10
If Command1.Left = 9840 Then
Timer1.Enabled = False
Timer2.Enabled = True
End If
End Sub


Private Sub Timer2_Timer()
Command1.Top = Command1.Top + 10
If Command1.Top = 9000 Then
Timer2.Enabled = False
Timer3.Enabled = True
End If
End Sub


Private Sub Timer3_Timer()
                                     9|Page
Command1.Left = Command1.Left - 10
If Command1.Left = 0 Then
Timer3.Enabled = False
Timer4.Enabled = True
End If
End Sub


Private Sub Timer4_Timer()
Command1.Top = Command1.Top - 10
If Command1.Top = 0 Then
Timer4.Enabled = False
Timer1.Enabled = True
End If
End Sub


Private Sub Timer5_Timer()
Command2.Top = Command2.Top + 10
If Command2.Top = 9000 Then
Timer5.Enabled = False
Timer6.Enabled = True
End If
                                     10 | P a g e
End Sub


Private Sub Timer6_Timer()
Command2.Left = Command2.Left + 10
If Command2.Left = 9840 Then
Timer6.Enabled = False
Timer7.Enabled = True
End If
End Sub


Private Sub Timer7_Timer()
Command2.Top = Command2.Top - 10
If Command2.Top = 0 Then
Timer7.Enabled = False
Timer8.Enabled = True
End If
End Sub


Private Sub Timer8_Timer()
Command2.Left = Command2.Left - 10
If Command2.Left = 0 Then
                                     11 | P a g e
Timer8.Enabled = False
Timer5.Enabled = True
End If
End Sub


          Output




                         12 | P a g e
Program 8


Chech Box And Option Button
          Code
Private Sub Check1_Click()
If Check1.Value = 1 Then
Text1.FontBold = True
ElseIf Check1.Value = 0 Then
Text1.FontBold = False
End If
End Sub


Private Sub Check2_Click()
If Check2.Value = 1 Then
Text1.FontItalic = True
ElseIf Check2.Value = 0 Then
Text1.FontItalic = False
End If
End Sub


Private Sub Check3_Click()
                                       13 | P a g e
If Check3.Value = 1 Then
Text1.FontUnderline = True
ElseIf Check3.Value = 0 Then
Text1.FontUnderline = False
End If
End Sub


Private Sub Option1_Click()
If Option1.Value = True Then
Text1.BackColor = vbBlue
End If
End Sub


Private Sub Option2_Click()
If Option2.Value = True Then
Text1.BackColor = vbGreen
End If
End Sub


Private Sub Option3_Click()
If Option3.Value = True Then
                               14 | P a g e
Text1.BackColor = vbYellow
End If
End Sub


          Output




                             15 | P a g e
Program 9


Combo Box
          Code
Private Sub Combo1_Click()
If Combo1.ListIndex = 0 Then
Text1.FontName = Combo1.Text
ElseIf Combo1.ListIndex = 1 Then
Text1.FontName = Combo1.Text
ElseIf Combo1.ListIndex = 2 Then
Text1.FontName = Combo1.Text
ElseIf Combo1.ListIndex = 3 Then
Text1.FontName = Combo1.Text
ElseIf Combo1.ListIndex = 4 Then
Text1.FontName = Combo1.Text
ElseIf Combo1.ListIndex = 5 Then
Text1.FontName = Combo1.Text
ElseIf Combo1.ListIndex = 6 Then
Text1.FontName = Combo1.Text
End If
End Sub
                                   16 | P a g e
Private Sub Combo2_Click()
If Combo2.ListIndex = 0 Then
Text1.FontSize = Combo2.Text
ElseIf Combo2.ListIndex = 1 Then
Text1.FontSize = Combo2.Text
ElseIf Combo2.ListIndex = 2 Then
Text1.FontSize = Combo2.Text
ElseIf Combo2.ListIndex = 3 Then
Text1.FontSize = Combo2.Text
ElseIf Combo2.ListIndex = 4 Then
Text1.FontSize = Combo2.Text
ElseIf Combo2.ListIndex = 5 Then
Text1.FontSize = Combo2.Text
ElseIf Combo2.ListIndex = 6 Then
Text1.FontSize = Combo2.Text
ElseIf Combo2.ListIndex = 7 Then
Text1.FontSize = Combo2.Text
ElseIf Combo2.ListIndex = 8 Then
Text1.FontSize = Combo2.Text
End If
                                   17 | P a g e
End Sub


Private Sub Form_Load()
Combo1.AddItem "Times New Roman"
Combo1.AddItem "Arial Black"
Combo1.AddItem "Batang"
Combo1.AddItem "Century"
Combo1.AddItem "Courier New"
Combo1.AddItem "impact"
Combo1.AddItem "Lucida Console"
End Sub
        Output




                                   18 | P a g e
Program 10


Calculating Student Result
          Code
Private Sub Combo3_Click()
If Combo3.ListIndex = 0 Then
Label3.Caption = "data strcture"
Label4.Caption = "visual basic"
Label5.Caption = "database"
Else
Label3.Caption = "accounts"
Label4.Caption = "MIS"
Label5.Caption = "economics"
End If
End Sub


Private Sub Command1_Click()
Label12.Caption = Text1.Text
Label14.Caption = Text2.Text
Label16.Caption = Text4.Text
Label18.Caption = Label3.Caption
                                   19 | P a g e
Label19.Caption = Label4.Caption
Label20.Caption = Label5.Caption
Label16.Caption = Label5.Caption
Label17.Caption = Combo3.Text
Label21.Caption = Text3.Text
Label22.Caption = Text5.Text
Label23.Caption = Text6.Text
Label25.Caption     =      Val(Text3.Text)   +   Val(Text5.Text)       +
Val(Text6.Text)
Text7.Text = ((Val(Text3.Text) + Val(Text5.Text) + Val(Text6.Text)) *
100) / 300
If Val(Text7.Text) >= 80 Then
Label29.Caption = "merit"
ElseIf Val(Text7.Text) >= 60 Then
Label29.Caption = "firstclass"
ElseIf Val(Text7.Text) >= 33 Then
Label29.Caption = "pass"
Else
Label29.Caption = "fail"
End If
End Sub


                                                             20 | P a g e
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub


         Output




                          21 | P a g e
Program 11
Paint Functions
          Code
Private Sub Command1_Click()
Form1.Cls
End Sub


Private Sub Form_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)
Form1.CurrentX = X
Form1.CurrentY = Y
End Sub


Private Sub Form_MouseMove(Button As Integer, Shift As Integer,
X As Single, Y As Single)
If Button = 1 Then
'Line (X, Y)-(CurrentX, CurrentY)
Circle (X, Y), 700
End If
End Sub




                                                       22 | P a g e
 Output




           23 | P a g e
Program 12


Puzzle Game
          Code
Private Sub Command1_Click()
If Command2.Caption = "" Then
Command2.Caption = Command1.Caption
Command1.Caption = ""
ElseIf Command4.Caption = "" Then
Command4.Caption = Command1.Caption
Command1.Caption = ""
End If
End Sub


Private Sub Command10_Click()
Command1.Caption = 1
Command2.Caption = 2
Command3.Caption = 3
Command4.Caption = 4
Command5.Caption = 5
Command6.Caption = 6
                                      24 | P a g e
Command7.Caption = 7
Command8.Caption = 8
Command9.Caption = ""
End Sub


Private Sub Command2_Click()
If Command1.Caption = "" Then
Command1.Caption = Command2.Caption
Command2.Caption = ""
ElseIf Command3.Caption = "" Then
Command3.Caption = Command2.Caption
Command2.Caption = ""
ElseIf Command5.Caption = "" Then
Command5.Caption = Command2.Caption
Command2.Caption = ""
End If
End Sub


Private Sub Command3_Click()
If Command2.Caption = "" Then
Command2.Caption = Command3.Caption
                                      25 | P a g e
Command3.Caption = ""
ElseIf Command6.Caption = "" Then
Command6.Caption = Command3.Caption
Command3.Caption = ""
End If
End Sub


Private Sub Command4_Click()
If Command1.Caption = "" Then
Command1.Caption = Command4.Caption
Command4.Caption = ""
ElseIf Command7.Caption = "" Then
Command7.Caption = Command4.Caption
Command4.Caption = ""
ElseIf Command5.Caption = "" Then
Command5.Caption = Command4.Caption
Command4.Caption = ""
End If
End Sub


Private Sub Command5_Click()
                                      26 | P a g e
If Command2.Caption = "" Then
Command2.Caption = Command5.Caption
Command5.Caption = ""
ElseIf Command4.Caption = "" Then
Command4.Caption = Command5.Caption
Command5.Caption = ""
ElseIf Command8.Caption = "" Then
Command8.Caption = Command5.Caption
Command5.Caption = ""
ElseIf Command6.Caption = "" Then
Command6.Caption = Command5.Caption
Command5.Caption = ""
End If
End Sub


Private Sub Command6_Click()
If Command3.Caption = "" Then
Command3.Caption = Command6.Caption
Command6.Caption = ""
ElseIf Command9.Caption = "" Then
Command9.Caption = Command6.Caption
                                      27 | P a g e
Command6.Caption = ""
End If
End Sub


Private Sub Command7_Click()
If Command4.Caption = "" Then
Command4.Caption = Command7.Caption
Command7.Caption = ""
ElseIf Command8.Caption = "" Then
Command8.Caption = Command7.Caption
Command7.Caption = ""
End If
End Sub


Private Sub Command8_Click()
If Command7.Caption = "" Then
Command7.Caption = Command8.Caption
Command8.Caption = ""
ElseIf Command5.Caption = "" Then
Command5.Caption = Command8.Caption
Command8.Caption = ""
                                      28 | P a g e
ElseIf Command9.Caption = "" Then
Command9.Caption = Command8.Caption
Command8.Caption = ""
End If
End Sub


Private Sub Command9_Click()
If Command8.Caption = "" Then
Command8.Caption = Command9.Caption
Command9.Caption = ""
ElseIf Command6.Caption = "" Then
Command6.Caption = Command9.Caption
Command9.Caption = ""
End If
End Sub




                                      29 | P a g e
 Output




           30 | P a g e
Program 13
MENU BAR

   Code

Private Sub Blue_Click()
Form1.BackColor = vbBlue
End Sub


Private Sub Exit_Click()
Unload Me
End Sub


Private Sub Green_Click()
Form1.BackColor = vbGreen
End Sub


Private Sub Maximize_Click()
Form1.WindowState = 2
End Sub


Private Sub Minimize_Click()
Form1.WindowState = 1
                                        31 | P a g e
End Sub


Private Sub Red_Click()
Form1.BackColor = vbRed
End Sub


Private Sub Restore_Click()
Form1.WindowState = 0
End Sub




                              32 | P a g e
 Output




           33 | P a g e

Más contenido relacionado

Destacado

Dự án Nam SaiGon Riverside
Dự án Nam SaiGon RiversideDự án Nam SaiGon Riverside
Dự án Nam SaiGon RiversideDuyệt Đoàn
 
приказ до ко № 5 546 от 26.07.10
приказ до ко № 5 546 от 26.07.10приказ до ко № 5 546 от 26.07.10
приказ до ко № 5 546 от 26.07.10Demanessa
 
Documentos DE CONDUCION ECONOMICA
Documentos DE CONDUCION ECONOMICA Documentos DE CONDUCION ECONOMICA
Documentos DE CONDUCION ECONOMICA Raf Alv
 
HCD-net ワークショップ「ユーザーエクスペリエンスデザインのためのストーリーテリング」 part3 ストーリーを作る
HCD-net ワークショップ「ユーザーエクスペリエンスデザインのためのストーリーテリング」 part3 ストーリーを作るHCD-net ワークショップ「ユーザーエクスペリエンスデザインのためのストーリーテリング」 part3 ストーリーを作る
HCD-net ワークショップ「ユーザーエクスペリエンスデザインのためのストーリーテリング」 part3 ストーリーを作るux_tokyo
 
Pecha Kucha Cibervoluntarios
Pecha Kucha Cibervoluntarios Pecha Kucha Cibervoluntarios
Pecha Kucha Cibervoluntarios losdisparejos
 
Jack burtons magazine analysis
Jack burtons magazine analysisJack burtons magazine analysis
Jack burtons magazine analysisMini Burton
 
Collins mc nicholas national salary survey 2011
Collins mc nicholas national salary survey 2011Collins mc nicholas national salary survey 2011
Collins mc nicholas national salary survey 2011michellemmurphy
 
мат. ответственноть
мат. ответственнотьмат. ответственноть
мат. ответственнотьDemanessa
 
Powerpoint for assigment 10 for PFR&P
Powerpoint for assigment 10 for PFR&PPowerpoint for assigment 10 for PFR&P
Powerpoint for assigment 10 for PFR&Pofurmenni9
 
Language history and change
Language history and change Language history and change
Language history and change elarae
 
Ed300 helen's part
Ed300 helen's partEd300 helen's part
Ed300 helen's parthelenjoyjose
 
херсонська мапа округів
херсонська мапа округівхерсонська мапа округів
херсонська мапа округівOlena Ursu
 
Field lab assignment
Field lab assignmentField lab assignment
Field lab assignmentsantillan9
 
Biblical Patriarchy
Biblical PatriarchyBiblical Patriarchy
Biblical Patriarchydkalil
 
Global South Development Magazine July 2010
Global South Development Magazine July 2010Global South Development Magazine July 2010
Global South Development Magazine July 2010globalsouth
 

Destacado (20)

Khosra Kabbo
Khosra Kabbo Khosra Kabbo
Khosra Kabbo
 
Rellotges
RellotgesRellotges
Rellotges
 
Dự án Nam SaiGon Riverside
Dự án Nam SaiGon RiversideDự án Nam SaiGon Riverside
Dự án Nam SaiGon Riverside
 
приказ до ко № 5 546 от 26.07.10
приказ до ко № 5 546 от 26.07.10приказ до ко № 5 546 от 26.07.10
приказ до ко № 5 546 от 26.07.10
 
Documentos DE CONDUCION ECONOMICA
Documentos DE CONDUCION ECONOMICA Documentos DE CONDUCION ECONOMICA
Documentos DE CONDUCION ECONOMICA
 
HCD-net ワークショップ「ユーザーエクスペリエンスデザインのためのストーリーテリング」 part3 ストーリーを作る
HCD-net ワークショップ「ユーザーエクスペリエンスデザインのためのストーリーテリング」 part3 ストーリーを作るHCD-net ワークショップ「ユーザーエクスペリエンスデザインのためのストーリーテリング」 part3 ストーリーを作る
HCD-net ワークショップ「ユーザーエクスペリエンスデザインのためのストーリーテリング」 part3 ストーリーを作る
 
May cat 220
May cat 220May cat 220
May cat 220
 
Pecha Kucha Cibervoluntarios
Pecha Kucha Cibervoluntarios Pecha Kucha Cibervoluntarios
Pecha Kucha Cibervoluntarios
 
Jack burtons magazine analysis
Jack burtons magazine analysisJack burtons magazine analysis
Jack burtons magazine analysis
 
Collins mc nicholas national salary survey 2011
Collins mc nicholas national salary survey 2011Collins mc nicholas national salary survey 2011
Collins mc nicholas national salary survey 2011
 
Ppt
PptPpt
Ppt
 
Ppt
PptPpt
Ppt
 
мат. ответственноть
мат. ответственнотьмат. ответственноть
мат. ответственноть
 
Powerpoint for assigment 10 for PFR&P
Powerpoint for assigment 10 for PFR&PPowerpoint for assigment 10 for PFR&P
Powerpoint for assigment 10 for PFR&P
 
Language history and change
Language history and change Language history and change
Language history and change
 
Ed300 helen's part
Ed300 helen's partEd300 helen's part
Ed300 helen's part
 
херсонська мапа округів
херсонська мапа округівхерсонська мапа округів
херсонська мапа округів
 
Field lab assignment
Field lab assignmentField lab assignment
Field lab assignment
 
Biblical Patriarchy
Biblical PatriarchyBiblical Patriarchy
Biblical Patriarchy
 
Global South Development Magazine July 2010
Global South Development Magazine July 2010Global South Development Magazine July 2010
Global South Development Magazine July 2010
 

Similar a Vbreport

Vbreport program
Vbreport programVbreport program
Vbreport programdhi her
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Yeardezyneecole
 
19.Advanced Visual Basic Lab.pdf
19.Advanced Visual Basic Lab.pdf19.Advanced Visual Basic Lab.pdf
19.Advanced Visual Basic Lab.pdfvirox10x
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Yeardezyneecole
 
Trabajo de ept lissethe toro
Trabajo de ept lissethe toroTrabajo de ept lissethe toro
Trabajo de ept lissethe torolissethee
 
Kajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third YearKajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third YearDezyneecole
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearDezyneecole
 
Sudarshan Joshi , BCA Third Year
Sudarshan Joshi , BCA Third YearSudarshan Joshi , BCA Third Year
Sudarshan Joshi , BCA Third Yeardezyneecole
 
Harendra Singh,BCA Third Year
Harendra Singh,BCA Third YearHarendra Singh,BCA Third Year
Harendra Singh,BCA Third Yeardezyneecole
 
Rakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearRakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearDezyneecole
 
Ravi Prakash Yadav , BCA Third Year
Ravi Prakash Yadav , BCA Third YearRavi Prakash Yadav , BCA Third Year
Ravi Prakash Yadav , BCA Third YearDezyneecole
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSKate Campbell
 
Akshay Sharma , BCA Third Year
Akshay Sharma , BCA Third YearAkshay Sharma , BCA Third Year
Akshay Sharma , BCA Third YearDezyneecole
 
Gaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearGaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearDezyneecole
 

Similar a Vbreport (20)

Vbreport program
Vbreport programVbreport program
Vbreport program
 
Vb file
Vb fileVb file
Vb file
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
 
19.Advanced Visual Basic Lab.pdf
19.Advanced Visual Basic Lab.pdf19.Advanced Visual Basic Lab.pdf
19.Advanced Visual Basic Lab.pdf
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Trabajo de ept lissethe toro
Trabajo de ept lissethe toroTrabajo de ept lissethe toro
Trabajo de ept lissethe toro
 
Kajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third YearKajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third Year
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third Year
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Sudarshan Joshi , BCA Third Year
Sudarshan Joshi , BCA Third YearSudarshan Joshi , BCA Third Year
Sudarshan Joshi , BCA Third Year
 
Harendra Singh,BCA Third Year
Harendra Singh,BCA Third YearHarendra Singh,BCA Third Year
Harendra Singh,BCA Third Year
 
Rakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearRakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third Year
 
Ravi Prakash Yadav , BCA Third Year
Ravi Prakash Yadav , BCA Third YearRavi Prakash Yadav , BCA Third Year
Ravi Prakash Yadav , BCA Third Year
 
Ict project pdf
Ict project pdfIct project pdf
Ict project pdf
 
Vb.net ii
Vb.net iiVb.net ii
Vb.net ii
 
Richtextbox
RichtextboxRichtextbox
Richtextbox
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTS
 
Akshay Sharma , BCA Third Year
Akshay Sharma , BCA Third YearAkshay Sharma , BCA Third Year
Akshay Sharma , BCA Third Year
 
Gaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearGaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third Year
 
Python for Beginners(v2)
Python for Beginners(v2)Python for Beginners(v2)
Python for Beginners(v2)
 

Más de shweta-sharma99 (13)

Biometrics
BiometricsBiometrics
Biometrics
 
Biometrics
BiometricsBiometrics
Biometrics
 
Testing
TestingTesting
Testing
 
Sql commands
Sql commandsSql commands
Sql commands
 
Rep on grid computing
Rep on grid computingRep on grid computing
Rep on grid computing
 
Java practical
Java practicalJava practical
Java practical
 
Graphics file
Graphics fileGraphics file
Graphics file
 
Software re engineering
Software re engineeringSoftware re engineering
Software re engineering
 
Simplex
SimplexSimplex
Simplex
 
Grid computing
Grid computingGrid computing
Grid computing
 
Cyborg
CyborgCyborg
Cyborg
 
Smartphone
SmartphoneSmartphone
Smartphone
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 

Último

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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
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
 
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
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Último (20)

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!
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
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
 
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)
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Vbreport

  • 1. Program 1 Printing Series  Code Private Sub Form_Click() For k = 1 To 5 Print k Next End Sub  Output 1|Page
  • 2. Program 2 Printing Triangle Series  Code Private Sub Form_Click() For r = 1 To 5 For c = 1 To r Print c; Next Print Next End Sub  Output 2|Page
  • 3. Program 3 Printing Reverse triangle series  Code Private Sub Form_Click() For r = 5 To 1 Step -1 For c = 1 To r Print c; Next Print Next End Sub  Output 3|Page
  • 4. Program 4 Multiply Two Numbers  Code Private Sub Command1_Click() Text3.Text = Val(Text1.Text) * Val(Text2.Text) End Sub Private Sub Form_Load() Text1.Text = "" Text2.Text = "" Text3.Text = "" End Sub  Output 4|Page
  • 5. Program 5 Printing Pyramid Series  Code Private Sub Form_Click() For r = 1 To 5 For k = 4 To r Step -1 Print " "; Next For c = 1 To r Print c; Next For d = r - 1 To 1 Step -1 Print d; Next Print Next End Sub 5|Page
  • 6.  Output 6|Page
  • 7. Program 6 Simple Calculator  Code Private Sub Command1_Click() Text3.Text = Val(Text1.Text) + Val(Text2.Text) End Sub Private Sub Command2_Click() Text3.Text = Val(Text1.Text) - Val(Text2.Text) End Sub Private Sub Command3_Click() Text3.Text = Val(Text1.Text) * Val(Text2.Text) End Sub Private Sub Command4_Click() Text3.Text = Val(Text1.Text) / Val(Text2.Text) End Sub 7|Page
  • 8.  Output 8|Page
  • 9. Program 7 Timer Control  Code Private Sub Timer1_Timer() Command1.Left = Command1.Left + 10 If Command1.Left = 9840 Then Timer1.Enabled = False Timer2.Enabled = True End If End Sub Private Sub Timer2_Timer() Command1.Top = Command1.Top + 10 If Command1.Top = 9000 Then Timer2.Enabled = False Timer3.Enabled = True End If End Sub Private Sub Timer3_Timer() 9|Page
  • 10. Command1.Left = Command1.Left - 10 If Command1.Left = 0 Then Timer3.Enabled = False Timer4.Enabled = True End If End Sub Private Sub Timer4_Timer() Command1.Top = Command1.Top - 10 If Command1.Top = 0 Then Timer4.Enabled = False Timer1.Enabled = True End If End Sub Private Sub Timer5_Timer() Command2.Top = Command2.Top + 10 If Command2.Top = 9000 Then Timer5.Enabled = False Timer6.Enabled = True End If 10 | P a g e
  • 11. End Sub Private Sub Timer6_Timer() Command2.Left = Command2.Left + 10 If Command2.Left = 9840 Then Timer6.Enabled = False Timer7.Enabled = True End If End Sub Private Sub Timer7_Timer() Command2.Top = Command2.Top - 10 If Command2.Top = 0 Then Timer7.Enabled = False Timer8.Enabled = True End If End Sub Private Sub Timer8_Timer() Command2.Left = Command2.Left - 10 If Command2.Left = 0 Then 11 | P a g e
  • 12. Timer8.Enabled = False Timer5.Enabled = True End If End Sub  Output 12 | P a g e
  • 13. Program 8 Chech Box And Option Button  Code Private Sub Check1_Click() If Check1.Value = 1 Then Text1.FontBold = True ElseIf Check1.Value = 0 Then Text1.FontBold = False End If End Sub Private Sub Check2_Click() If Check2.Value = 1 Then Text1.FontItalic = True ElseIf Check2.Value = 0 Then Text1.FontItalic = False End If End Sub Private Sub Check3_Click() 13 | P a g e
  • 14. If Check3.Value = 1 Then Text1.FontUnderline = True ElseIf Check3.Value = 0 Then Text1.FontUnderline = False End If End Sub Private Sub Option1_Click() If Option1.Value = True Then Text1.BackColor = vbBlue End If End Sub Private Sub Option2_Click() If Option2.Value = True Then Text1.BackColor = vbGreen End If End Sub Private Sub Option3_Click() If Option3.Value = True Then 14 | P a g e
  • 15. Text1.BackColor = vbYellow End If End Sub  Output 15 | P a g e
  • 16. Program 9 Combo Box  Code Private Sub Combo1_Click() If Combo1.ListIndex = 0 Then Text1.FontName = Combo1.Text ElseIf Combo1.ListIndex = 1 Then Text1.FontName = Combo1.Text ElseIf Combo1.ListIndex = 2 Then Text1.FontName = Combo1.Text ElseIf Combo1.ListIndex = 3 Then Text1.FontName = Combo1.Text ElseIf Combo1.ListIndex = 4 Then Text1.FontName = Combo1.Text ElseIf Combo1.ListIndex = 5 Then Text1.FontName = Combo1.Text ElseIf Combo1.ListIndex = 6 Then Text1.FontName = Combo1.Text End If End Sub 16 | P a g e
  • 17. Private Sub Combo2_Click() If Combo2.ListIndex = 0 Then Text1.FontSize = Combo2.Text ElseIf Combo2.ListIndex = 1 Then Text1.FontSize = Combo2.Text ElseIf Combo2.ListIndex = 2 Then Text1.FontSize = Combo2.Text ElseIf Combo2.ListIndex = 3 Then Text1.FontSize = Combo2.Text ElseIf Combo2.ListIndex = 4 Then Text1.FontSize = Combo2.Text ElseIf Combo2.ListIndex = 5 Then Text1.FontSize = Combo2.Text ElseIf Combo2.ListIndex = 6 Then Text1.FontSize = Combo2.Text ElseIf Combo2.ListIndex = 7 Then Text1.FontSize = Combo2.Text ElseIf Combo2.ListIndex = 8 Then Text1.FontSize = Combo2.Text End If 17 | P a g e
  • 18. End Sub Private Sub Form_Load() Combo1.AddItem "Times New Roman" Combo1.AddItem "Arial Black" Combo1.AddItem "Batang" Combo1.AddItem "Century" Combo1.AddItem "Courier New" Combo1.AddItem "impact" Combo1.AddItem "Lucida Console" End Sub  Output 18 | P a g e
  • 19. Program 10 Calculating Student Result  Code Private Sub Combo3_Click() If Combo3.ListIndex = 0 Then Label3.Caption = "data strcture" Label4.Caption = "visual basic" Label5.Caption = "database" Else Label3.Caption = "accounts" Label4.Caption = "MIS" Label5.Caption = "economics" End If End Sub Private Sub Command1_Click() Label12.Caption = Text1.Text Label14.Caption = Text2.Text Label16.Caption = Text4.Text Label18.Caption = Label3.Caption 19 | P a g e
  • 20. Label19.Caption = Label4.Caption Label20.Caption = Label5.Caption Label16.Caption = Label5.Caption Label17.Caption = Combo3.Text Label21.Caption = Text3.Text Label22.Caption = Text5.Text Label23.Caption = Text6.Text Label25.Caption = Val(Text3.Text) + Val(Text5.Text) + Val(Text6.Text) Text7.Text = ((Val(Text3.Text) + Val(Text5.Text) + Val(Text6.Text)) * 100) / 300 If Val(Text7.Text) >= 80 Then Label29.Caption = "merit" ElseIf Val(Text7.Text) >= 60 Then Label29.Caption = "firstclass" ElseIf Val(Text7.Text) >= 33 Then Label29.Caption = "pass" Else Label29.Caption = "fail" End If End Sub 20 | P a g e
  • 21. Private Sub Form_Load() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" End Sub  Output 21 | P a g e
  • 22. Program 11 Paint Functions  Code Private Sub Command1_Click() Form1.Cls End Sub Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Form1.CurrentX = X Form1.CurrentY = Y End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 1 Then 'Line (X, Y)-(CurrentX, CurrentY) Circle (X, Y), 700 End If End Sub 22 | P a g e
  • 23.  Output 23 | P a g e
  • 24. Program 12 Puzzle Game  Code Private Sub Command1_Click() If Command2.Caption = "" Then Command2.Caption = Command1.Caption Command1.Caption = "" ElseIf Command4.Caption = "" Then Command4.Caption = Command1.Caption Command1.Caption = "" End If End Sub Private Sub Command10_Click() Command1.Caption = 1 Command2.Caption = 2 Command3.Caption = 3 Command4.Caption = 4 Command5.Caption = 5 Command6.Caption = 6 24 | P a g e
  • 25. Command7.Caption = 7 Command8.Caption = 8 Command9.Caption = "" End Sub Private Sub Command2_Click() If Command1.Caption = "" Then Command1.Caption = Command2.Caption Command2.Caption = "" ElseIf Command3.Caption = "" Then Command3.Caption = Command2.Caption Command2.Caption = "" ElseIf Command5.Caption = "" Then Command5.Caption = Command2.Caption Command2.Caption = "" End If End Sub Private Sub Command3_Click() If Command2.Caption = "" Then Command2.Caption = Command3.Caption 25 | P a g e
  • 26. Command3.Caption = "" ElseIf Command6.Caption = "" Then Command6.Caption = Command3.Caption Command3.Caption = "" End If End Sub Private Sub Command4_Click() If Command1.Caption = "" Then Command1.Caption = Command4.Caption Command4.Caption = "" ElseIf Command7.Caption = "" Then Command7.Caption = Command4.Caption Command4.Caption = "" ElseIf Command5.Caption = "" Then Command5.Caption = Command4.Caption Command4.Caption = "" End If End Sub Private Sub Command5_Click() 26 | P a g e
  • 27. If Command2.Caption = "" Then Command2.Caption = Command5.Caption Command5.Caption = "" ElseIf Command4.Caption = "" Then Command4.Caption = Command5.Caption Command5.Caption = "" ElseIf Command8.Caption = "" Then Command8.Caption = Command5.Caption Command5.Caption = "" ElseIf Command6.Caption = "" Then Command6.Caption = Command5.Caption Command5.Caption = "" End If End Sub Private Sub Command6_Click() If Command3.Caption = "" Then Command3.Caption = Command6.Caption Command6.Caption = "" ElseIf Command9.Caption = "" Then Command9.Caption = Command6.Caption 27 | P a g e
  • 28. Command6.Caption = "" End If End Sub Private Sub Command7_Click() If Command4.Caption = "" Then Command4.Caption = Command7.Caption Command7.Caption = "" ElseIf Command8.Caption = "" Then Command8.Caption = Command7.Caption Command7.Caption = "" End If End Sub Private Sub Command8_Click() If Command7.Caption = "" Then Command7.Caption = Command8.Caption Command8.Caption = "" ElseIf Command5.Caption = "" Then Command5.Caption = Command8.Caption Command8.Caption = "" 28 | P a g e
  • 29. ElseIf Command9.Caption = "" Then Command9.Caption = Command8.Caption Command8.Caption = "" End If End Sub Private Sub Command9_Click() If Command8.Caption = "" Then Command8.Caption = Command9.Caption Command9.Caption = "" ElseIf Command6.Caption = "" Then Command6.Caption = Command9.Caption Command9.Caption = "" End If End Sub 29 | P a g e
  • 30.  Output 30 | P a g e
  • 31. Program 13 MENU BAR  Code Private Sub Blue_Click() Form1.BackColor = vbBlue End Sub Private Sub Exit_Click() Unload Me End Sub Private Sub Green_Click() Form1.BackColor = vbGreen End Sub Private Sub Maximize_Click() Form1.WindowState = 2 End Sub Private Sub Minimize_Click() Form1.WindowState = 1 31 | P a g e
  • 32. End Sub Private Sub Red_Click() Form1.BackColor = vbRed End Sub Private Sub Restore_Click() Form1.WindowState = 0 End Sub 32 | P a g e
  • 33.  Output 33 | P a g e