SlideShare a Scribd company logo
1 of 33
1) Display a message in a lable on click event of the button.
Design:-
Public Class Form1
Private Sub btnok_Click(sender As Object, e As EventArgs) Handles btnok.Click
lblshow.Text += "Hello,window!"
End Sub
End Class
Output:-
2) Create a simple VB.Net Project. Place a button on the form and show welcome message on
the click of the button using msgbox() function.
Design:-
Private Sub btnclick_Click(sender As Object, e As EventArgs) Handles btnclick.Click
MessageBox.Show("welcome")
End Sub
End Class
Output:-
3) Accept two numbers using Inputbox on the click of the button and display SUM of these
two numbers using Msgbox.
Design:-
Private Sub btnsumoftwonumber_Click(sender As Object, e As EventArgs) Handles
btnsumoftwonumber.Click
Dim a, b, c As Integer
a = InputBox("Enter First no", "addition")
b = InputBox("Enter Second no", "addition")
c = a + b
MessageBox.Show("ADDITION IS " + Convert.ToString(c), "addition")
End Sub
End Class
Output:-
4) Design a form as shown below and perform the operations on the numbers entered.
ResultTexbox mustbe readonly
Design:-
Public Class Form1
Private Sub btnplus_Click(sender As Object, e As EventArgs) Handles btnplus.Click
Dim No1 As Integer = Convert.ToInt32(txtno1.Text)
Dim No2 As Integer = Convert.ToInt32(txtno2.Text)
Dim Result As Integer
Result = No1 + No2
txtresult.Text = Result
End Sub
Private Sub btnminus_Click(sender As Object, e As EventArgs) Handles btnminus.Click
Dim No1 As Integer = Convert.ToInt32(txtno1.Text)
Dim No2 As Integer = Convert.ToInt32(txtno2.Text)
Dim Result As Integer
Result = No1 - No2
txtresult.Text = Result
End Sub
Private Sub btnmulti_Click(sender As Object, e As EventArgs) Handles btnmulti.Click
Dim No1 As Integer = Convert.ToInt32(txtno1.Text)
Dim No2 As Integer = Convert.ToInt32(txtno2.Text)
Dim Result As Integer
Result = No1 * No2
txtresult.Text = Result
End Sub
Private Sub btndiv_Click(sender As Object, e As EventArgs) Handles btndiv.Click
Dim No1 As Integer = Convert.ToInt32(txtno1.Text)
Dim No2 As Integer = Convert.ToInt32(txtno2.Text)
Dim Result As Integer
Result = No1 / No2
txtresult.Text = Result
End Sub
End Class
Output:-
5) Write a program to find weather the given no is Positive, negative or zero.
Design:-
Private Sub btnclick_Click(sender As Object, e As EventArgs) Handles btnclick.Click
Dim no As Integer = Convert.ToInt32(txtnum.Text)
If no > 0 Then
MessageBox.Show("Positive")
txtnum.Clear()
ElseIf no < 0 Then
MessageBox.Show("Negative")
txtnum.Clear()
Else
MessageBox.Show("Zero")
txtnum.Clear()
End If
End Sub
End Class
Output:-
6) Write a program to find the maximum and minimum of given three numbers.
Design:-
Private Sub btnmin_Click(sender As Object, e As EventArgs) Handles btnmin.Click
Dim no1 As Integer = Convert.ToInt32(txtno1.Text)
Dim no2 As Integer = Convert.ToInt32(txtno2.Text)
Dim no3 As Integer = Convert.ToInt32(txtno3.Text)
If no1 < no2 And no1 < no3 Then
MessageBox.Show(no1.ToString + " is minimum")
ElseIf no2 < no1 And no2 < no3 Then
MessageBox.Show(no2.ToString + " is minimum")
ElseIf no3 < no1 And no3 < no2 Then
MessageBox.Show(no3.ToString + " is minimum")
End If
End Sub
Private Sub btnmax_Click(sender As Object, e As EventArgs) Handles btnmax.Click
Dim no1 As Integer = Convert.ToInt32(txtno2.Text)
Dim no2 As Integer = Convert.ToInt32(txtno2.Text)
Dim no3 As Integer = Convert.ToInt32(txtno3.Text)
Dim no1 As Integer = Convert.ToInt32(txtno2.Text)
Dim no2 As Integer = Convert.ToInt32(txtno2.Text)
Dim no3 As Integer = Convert.ToInt32(txtno3.Text)
If no1 > no2 And no1 > no3 Then
MessageBox.Show(no1.ToString + " is maximum")
ElseIf no2 > no1 And no2 > no3 Then
MessageBox.Show(no2.ToString + " is maximum")
ElseIf no3 > no1 And no3 > no2 Then
MessageBox.Show(no3.ToString + " is maximum")
End If
End Sub
End Class
Output:-
7) Develop VB.NET application which calculates the simple interest = p*r*n / 100 and
compound interest = p*(1+r/100)^n using textbox. In the same application take another form
which calculates area and circumference of circle by declaring Pi as constant in module
Design:-
Private Sub btnsimple_Click(sender As Object, e As EventArgs) Handles btnsimple.Click
Dim p As Integer = txtprincipal.Text
Dim r As Integer = txtrate.Text
Dim t As Integer = txttax.Text
Dim ans As Integer
ans = p * r * t / 100
MessageBox.Show(ans)
End Sub
Private Sub btncompound_Click(sender As Object, e As EventArgs) Handles
btncompound.Click
Dim p As Integer = txtprincipal.Text
Dim r As Integer = txtrate.Text
Dim t As Integer = txttax.Text
Dim ans As Integer
ans = p * (1 + r / 100) ^ t - p
MessageBox.Show(ans)
End Sub
Private Sub btncircleradius_Click(sender As Object, e As EventArgs) Handles
btncircleradius.Click
Dim pi As Double = 3.14
Dim r As Integer = txtradius.Text
Dim area As Double
area = pi * r * r
MessageBox.Show(area)
End Sub
End Class
Output:-
8) Design a VB form as shown below to read the student data and generate the mark-sheet
data. Clear the data when user clicks the “Clear” button. When user click on “Exit” then end
the execution.
Design:-
Private Sub btngeneral_Click(sender As Object, e As EventArgs) Handles btngeneral.Click
Dim sub1, sub2, sub3, sub4, sub5, sub6, total, per As Double
sub1 = txtsub1.Text
sub2 = txtsub2.Text
sub3 = txtsub3.Text
sub4 = txtsub4.Text
sub5 = txtsub5.Text
sub6 = txtsub6.Text
total = sub1 + sub2 + sub3 + sub4 + sub5 + sub6
txttotal.Text() = total.ToString()
per = total / 6
txtper.Text() = per.ToString()
Dim grade As String
If per >= 90 And per >= 100 Then
txtgrade.Text = "A+"
ElseIf per >= 80 And per <= 89 Then
txtgrade.Text = "A"
ElseIf per >= 70 And per <= 79 Then
txtgrade.Text = "B+"
ElseIf per >= 60 And per <= 69 Then
txtgrade.Text = "B"
ElseIf per >= 50 And per <= 59 Then
txtgrade.Text = "C"
ElseIf per >= 40 And per <= 49 Then
txtgrade.Text = "C+"
Else
txtgrade.Text = "fail"
If txtgrade.Text = "per <=49" Then
txtgrade.Text = "fail"
txtgrade.Enabled = False
Else
txtgrade.Enabled = True
MessageBox.Show("fail")
End If
End If
End Sub
Private Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click
txtname.Clear()
txtrollno.Clear()
txtsub1.Clear()
txtsub2.Clear()
txtsub3.Clear()
txtsub4.Clear()
txtsub5.Clear()
txtsub6.Clear()
txtgrade.Clear()
txtper.Clear()
txttotal.Clear()
End Sub
End Class
Output:-
9) Design the digital watch using Timer Control.
Design:-
Private Sub TimerTime_Tick(sender As Object, e As EventArgs) Handles TimerTime.Tick
lblhour.Text = Now.Hour
lblmin.Text = Now.Minute
lblsecond.Text = Now.Second
End Sub
Private Sub btnstart_Click(sender As Object, e As EventArgs) Handles btnstart.Click
TimerTime.Start()
End Sub
Private Sub btnstop_Click(sender As Object, e As EventArgs) Handles btnstop.Click
TimerTime.Stop()
End Sub
End Class
Output:-
10) Design the following form.
From the given combo boxes user has to select Starting value and ending value. When
user clicks on “Prime nos” radio button then the prime nos. between the given ranges is
displayed in the list box. Same as for other options.
Design:-
Private Sub rbevenno_CheckedChanged(sender As Object, e As EventArgs) Handles
rbevenno.CheckedChanged
lbdisplay.Items.Clear()
Dim no, no1 As Integer
no = cbstart.Text
no1 = cbend.Text
For item = no To no1 Step 1
If item Mod 2 = 0 Then
lbdisplay.Items.Add(item)
End If
Next
End Sub
Private Sub rbprimeno_CheckedChanged(sender As Object, e As EventArgs) Handles
rbprimeno.CheckedChanged
Dim no, no1, i, f As Integer
f = 0
no = cbstart.Text
no1 = cbend.Text
For item = no To no1
For i = 2 To item - 1
If item Mod i = 0 Then
f = 1
Exit For
Else
f = 0
End If
Next
If f = 0 Then
lbdisplay.Items.Add(item)
End If
Next
End Sub
Private Sub rboddno_CheckedChanged(sender As Object, e As EventArgs) Handles
rboddno.CheckedChanged
lbdisplay.Items.Clear()
Dim no, no1 As Integer
no = cbstart.Text
no1 = cbend.Text
For item = no To no1 Step 1
If item Mod 2 <> 0 Then
lbdisplay.Items.Add(item)
End If
Next
End Sub
End Class
Output:-
11) Develop following form. When user clicks on Submit button then all information will be
printed in following textbox. When user clicks on Clear then all textboxes will clear. When user
clicks on Exit button then application will be closed.
Design:-
Private Sub btnsubmit_Click(sender As Object, e As EventArgs) Handles btnsubmit.Click
Dim l, f, a, rd As String
Dim gender, hobbies As String
gender = hobbies = ""
f = txtname.Text
l = txtlastname.Text
a = txtaddress.Text
If rbmarried.Checked = True Then
rd = "Married"
ElseIf rbunmarried.Checked = True Then
rd = "UnMarried"
End If
If rbmale.Checked = True Then
gender = "Male"
ElseIf rbfemale.Checked = True Then
gender = "Female"
End If
If cbread.Checked = True Then
hobbies += "Read"
End If
If cbwrite.Checked = True Then
hobbies += "Write"
End If
If cbspeak.Checked = True Then
hobbies += "Speak"
End If
Dim selecteddate As Date
selecteddate = dtpdateofbirth.Value
Dim year As Integer = selecteddate.Year
Dim month As Integer = selecteddate.Month
Dim day As Integer = selecteddate.Day
txtshow.Text = "First Name :" + f + " " + "Last Name :" + l + vbNewLine
txtshow.Text += "Address : " + a + vbNewLine
txtshow.Text += "Marital Status : " + rd + vbNewLine
txtshow.Text += "Gender : " + gender + vbNewLine
txtshow.Text += "EnglishAbility : " + hobbies + vbNewLine
txtshow.Text += "Date Of Birth : " + day.ToString() + "/" + month.ToString() +
"/" + year.ToString() + vbNewLine
End Sub
Private Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click
txtname.Clear()
txtlastname.Clear()
txtaddress.Clear()
End Sub
Private Sub btnexit_Click(sender As Object, e As EventArgs) Handles btnexit.Click
Me.Close()
End Sub
End Class
Output:-
12) Develop the following form. When user clicks add button add the name in list box (Friend),
using list box (Friend) enter selected name in another list box (Invite), also remove-selected
name from list box
Design:-
Public Class exam
Private Sub btnaAdd_Click(sender As Object, e As EventArgs) Handles
btnaAdd.Click
Dim item As String
item = txtName.Text.Trim()
lstbxfriendlist.Items.Add(item)
End Sub
Private Sub btnRight_Click(sender As Object, e As EventArgs) Handles
btnRight.Click
For Each item In lstbxfriendlist.SelectedItems
lstbxSelectedfriendlist.Items.Add(item)
Next
If lstbxfriendlist.SelectedItems.Count > 0 Then
For checked As Integer = lstbxfriendlist.SelectedItems.Count - 1
To 0 Step -1
lstbxfriendlist.Items.Remove(lstbxfriendlist.SelectedItems(checked))
Next
End If
End Sub
Private Sub btnLeft_Click(sender As Object, e As EventArgs) Handles
btnLeft.Click
For Each item In lstbxfriendlist.SelectedItems
lstbxSelectedfriendlist.Items.Add(item)
Next
If lstbxfriendlist.SelectedItems.Count > 0 Then
For checked As Integer = lstbxfriendlist.SelectedItems.Count - 1
To 0 Step -1
lstbxfriendlist.Items.Remove(lstbxfriendlist.SelectedItems(checked))
Next
End If
End Sub
Private Sub btnDoubleleft_Click(sender As Object, e As EventArgs) Handles
btnDoubleleft.Click
For Each item In lstbxSelectedfriendlist.SelectedItems
lstbxfriendlist.Items.Add(item)
Next
If lstbxSelectedfriendlist.SelectedItems.Count > 0 Then
For checked As Integer =
lstbxSelectedfriendlist.SelectedItems.Count - 1 To 0 Step -1
lstbxSelectedfriendlist.Items.Remove(lstbxSelectedfriendlist.SelectedItems(ch
ecked))
Next
End If
End Sub
Private Sub btnDoubleright_Click(sender As Object, e As EventArgs)
Handles btnDoubleright.Click
For Each item In lstbxSelectedfriendlist.SelectedItems
lstbxfriendlist.Items.Add(item)
Next
If lstbxSelectedfriendlist.SelectedItems.Count > 0 Then
For checked As Integer =
lstbxSelectedfriendlist.SelectedItems.Count - 1 To 0 Step -1
lstbxSelectedfriendlist.Items.Remove(lstbxSelectedfriendlist.SelectedItems(ch
ecked))
Next
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Me.Close()
End Sub
End Class
Output:-

More Related Content

Similar to Docimp

Inventory management
Inventory managementInventory management
Inventory managementRajeev Sharan
 
LoginFormCode
LoginFormCodeLoginFormCode
LoginFormCoderk5media
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Yeardezyneecole
 
Visual Basic
Visual BasicVisual Basic
Visual BasicVj NiroSh
 
Harendra Singh,BCA Third Year
Harendra Singh,BCA Third YearHarendra Singh,BCA Third Year
Harendra Singh,BCA Third Yeardezyneecole
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Yeardezyneecole
 
Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaYusman Kurniadi
 
Rakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearRakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearDezyneecole
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambasguestdd103d
 
Programas Gambas
Programas GambasProgramas Gambas
Programas GambasRZYMJ
 
Kajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third YearKajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third YearDezyneecole
 
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.154.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15Rajes Wari
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearDezyneecole
 
Akshay Sharma , BCA Third Year
Akshay Sharma , BCA Third YearAkshay Sharma , BCA Third Year
Akshay Sharma , BCA Third YearDezyneecole
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subirguest9da3a3
 

Similar to Docimp (20)

Vb file
Vb fileVb file
Vb file
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
Colegio municipal
Colegio municipalColegio municipal
Colegio municipal
 
Inventory management
Inventory managementInventory management
Inventory management
 
LoginFormCode
LoginFormCodeLoginFormCode
LoginFormCode
 
Gambas
GambasGambas
Gambas
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
 
Harendra Singh,BCA Third Year
Harendra Singh,BCA Third YearHarendra Singh,BCA Third Year
Harendra Singh,BCA Third Year
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
 
Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhana
 
Rakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third YearRakesh Bijawat , BCA Third Year
Rakesh Bijawat , BCA Third Year
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambas
 
Programas Gambas
Programas GambasProgramas Gambas
Programas Gambas
 
Kajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third YearKajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third Year
 
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.154.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
 
Metode
MetodeMetode
Metode
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third Year
 
Akshay Sharma , BCA Third Year
Akshay Sharma , BCA Third YearAkshay Sharma , BCA Third Year
Akshay Sharma , BCA Third Year
 
Trabajo Para Subir
Trabajo Para SubirTrabajo Para Subir
Trabajo Para Subir
 

Recently uploaded

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 

Docimp

  • 1. 1) Display a message in a lable on click event of the button. Design:- Public Class Form1 Private Sub btnok_Click(sender As Object, e As EventArgs) Handles btnok.Click lblshow.Text += "Hello,window!" End Sub End Class
  • 3. 2) Create a simple VB.Net Project. Place a button on the form and show welcome message on the click of the button using msgbox() function. Design:- Private Sub btnclick_Click(sender As Object, e As EventArgs) Handles btnclick.Click MessageBox.Show("welcome") End Sub End Class
  • 5. 3) Accept two numbers using Inputbox on the click of the button and display SUM of these two numbers using Msgbox. Design:- Private Sub btnsumoftwonumber_Click(sender As Object, e As EventArgs) Handles btnsumoftwonumber.Click Dim a, b, c As Integer a = InputBox("Enter First no", "addition") b = InputBox("Enter Second no", "addition") c = a + b MessageBox.Show("ADDITION IS " + Convert.ToString(c), "addition") End Sub End Class
  • 7.
  • 8. 4) Design a form as shown below and perform the operations on the numbers entered. ResultTexbox mustbe readonly Design:- Public Class Form1 Private Sub btnplus_Click(sender As Object, e As EventArgs) Handles btnplus.Click Dim No1 As Integer = Convert.ToInt32(txtno1.Text) Dim No2 As Integer = Convert.ToInt32(txtno2.Text) Dim Result As Integer Result = No1 + No2 txtresult.Text = Result
  • 9. End Sub Private Sub btnminus_Click(sender As Object, e As EventArgs) Handles btnminus.Click Dim No1 As Integer = Convert.ToInt32(txtno1.Text) Dim No2 As Integer = Convert.ToInt32(txtno2.Text) Dim Result As Integer Result = No1 - No2 txtresult.Text = Result End Sub Private Sub btnmulti_Click(sender As Object, e As EventArgs) Handles btnmulti.Click Dim No1 As Integer = Convert.ToInt32(txtno1.Text) Dim No2 As Integer = Convert.ToInt32(txtno2.Text) Dim Result As Integer Result = No1 * No2 txtresult.Text = Result End Sub Private Sub btndiv_Click(sender As Object, e As EventArgs) Handles btndiv.Click Dim No1 As Integer = Convert.ToInt32(txtno1.Text) Dim No2 As Integer = Convert.ToInt32(txtno2.Text) Dim Result As Integer Result = No1 / No2 txtresult.Text = Result End Sub End Class
  • 11. 5) Write a program to find weather the given no is Positive, negative or zero. Design:- Private Sub btnclick_Click(sender As Object, e As EventArgs) Handles btnclick.Click Dim no As Integer = Convert.ToInt32(txtnum.Text) If no > 0 Then MessageBox.Show("Positive") txtnum.Clear() ElseIf no < 0 Then MessageBox.Show("Negative") txtnum.Clear() Else MessageBox.Show("Zero") txtnum.Clear() End If End Sub End Class
  • 13. 6) Write a program to find the maximum and minimum of given three numbers. Design:- Private Sub btnmin_Click(sender As Object, e As EventArgs) Handles btnmin.Click Dim no1 As Integer = Convert.ToInt32(txtno1.Text) Dim no2 As Integer = Convert.ToInt32(txtno2.Text) Dim no3 As Integer = Convert.ToInt32(txtno3.Text) If no1 < no2 And no1 < no3 Then MessageBox.Show(no1.ToString + " is minimum") ElseIf no2 < no1 And no2 < no3 Then MessageBox.Show(no2.ToString + " is minimum") ElseIf no3 < no1 And no3 < no2 Then MessageBox.Show(no3.ToString + " is minimum") End If End Sub Private Sub btnmax_Click(sender As Object, e As EventArgs) Handles btnmax.Click Dim no1 As Integer = Convert.ToInt32(txtno2.Text) Dim no2 As Integer = Convert.ToInt32(txtno2.Text) Dim no3 As Integer = Convert.ToInt32(txtno3.Text) Dim no1 As Integer = Convert.ToInt32(txtno2.Text) Dim no2 As Integer = Convert.ToInt32(txtno2.Text) Dim no3 As Integer = Convert.ToInt32(txtno3.Text) If no1 > no2 And no1 > no3 Then MessageBox.Show(no1.ToString + " is maximum") ElseIf no2 > no1 And no2 > no3 Then MessageBox.Show(no2.ToString + " is maximum") ElseIf no3 > no1 And no3 > no2 Then MessageBox.Show(no3.ToString + " is maximum") End If End Sub
  • 15. 7) Develop VB.NET application which calculates the simple interest = p*r*n / 100 and compound interest = p*(1+r/100)^n using textbox. In the same application take another form which calculates area and circumference of circle by declaring Pi as constant in module Design:- Private Sub btnsimple_Click(sender As Object, e As EventArgs) Handles btnsimple.Click Dim p As Integer = txtprincipal.Text Dim r As Integer = txtrate.Text Dim t As Integer = txttax.Text Dim ans As Integer ans = p * r * t / 100 MessageBox.Show(ans) End Sub Private Sub btncompound_Click(sender As Object, e As EventArgs) Handles btncompound.Click Dim p As Integer = txtprincipal.Text Dim r As Integer = txtrate.Text Dim t As Integer = txttax.Text Dim ans As Integer ans = p * (1 + r / 100) ^ t - p MessageBox.Show(ans) End Sub Private Sub btncircleradius_Click(sender As Object, e As EventArgs) Handles btncircleradius.Click Dim pi As Double = 3.14 Dim r As Integer = txtradius.Text Dim area As Double
  • 16. area = pi * r * r MessageBox.Show(area) End Sub End Class Output:-
  • 17.
  • 18. 8) Design a VB form as shown below to read the student data and generate the mark-sheet data. Clear the data when user clicks the “Clear” button. When user click on “Exit” then end the execution. Design:- Private Sub btngeneral_Click(sender As Object, e As EventArgs) Handles btngeneral.Click Dim sub1, sub2, sub3, sub4, sub5, sub6, total, per As Double sub1 = txtsub1.Text sub2 = txtsub2.Text sub3 = txtsub3.Text
  • 19. sub4 = txtsub4.Text sub5 = txtsub5.Text sub6 = txtsub6.Text total = sub1 + sub2 + sub3 + sub4 + sub5 + sub6 txttotal.Text() = total.ToString() per = total / 6 txtper.Text() = per.ToString() Dim grade As String If per >= 90 And per >= 100 Then txtgrade.Text = "A+" ElseIf per >= 80 And per <= 89 Then txtgrade.Text = "A" ElseIf per >= 70 And per <= 79 Then txtgrade.Text = "B+" ElseIf per >= 60 And per <= 69 Then txtgrade.Text = "B" ElseIf per >= 50 And per <= 59 Then txtgrade.Text = "C" ElseIf per >= 40 And per <= 49 Then txtgrade.Text = "C+" Else txtgrade.Text = "fail" If txtgrade.Text = "per <=49" Then txtgrade.Text = "fail" txtgrade.Enabled = False Else txtgrade.Enabled = True MessageBox.Show("fail") End If End If End Sub Private Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click txtname.Clear() txtrollno.Clear() txtsub1.Clear() txtsub2.Clear() txtsub3.Clear() txtsub4.Clear() txtsub5.Clear() txtsub6.Clear() txtgrade.Clear() txtper.Clear() txttotal.Clear() End Sub End Class
  • 21. 9) Design the digital watch using Timer Control. Design:- Private Sub TimerTime_Tick(sender As Object, e As EventArgs) Handles TimerTime.Tick lblhour.Text = Now.Hour lblmin.Text = Now.Minute lblsecond.Text = Now.Second End Sub Private Sub btnstart_Click(sender As Object, e As EventArgs) Handles btnstart.Click TimerTime.Start() End Sub Private Sub btnstop_Click(sender As Object, e As EventArgs) Handles btnstop.Click TimerTime.Stop() End Sub End Class
  • 23. 10) Design the following form. From the given combo boxes user has to select Starting value and ending value. When user clicks on “Prime nos” radio button then the prime nos. between the given ranges is displayed in the list box. Same as for other options. Design:-
  • 24. Private Sub rbevenno_CheckedChanged(sender As Object, e As EventArgs) Handles rbevenno.CheckedChanged lbdisplay.Items.Clear() Dim no, no1 As Integer no = cbstart.Text no1 = cbend.Text For item = no To no1 Step 1 If item Mod 2 = 0 Then lbdisplay.Items.Add(item) End If Next End Sub Private Sub rbprimeno_CheckedChanged(sender As Object, e As EventArgs) Handles rbprimeno.CheckedChanged Dim no, no1, i, f As Integer f = 0 no = cbstart.Text no1 = cbend.Text For item = no To no1 For i = 2 To item - 1 If item Mod i = 0 Then f = 1 Exit For Else f = 0 End If Next If f = 0 Then lbdisplay.Items.Add(item) End If Next End Sub Private Sub rboddno_CheckedChanged(sender As Object, e As EventArgs) Handles rboddno.CheckedChanged lbdisplay.Items.Clear() Dim no, no1 As Integer no = cbstart.Text no1 = cbend.Text For item = no To no1 Step 1 If item Mod 2 <> 0 Then lbdisplay.Items.Add(item) End If Next End Sub End Class Output:-
  • 25.
  • 26.
  • 27. 11) Develop following form. When user clicks on Submit button then all information will be printed in following textbox. When user clicks on Clear then all textboxes will clear. When user clicks on Exit button then application will be closed. Design:- Private Sub btnsubmit_Click(sender As Object, e As EventArgs) Handles btnsubmit.Click Dim l, f, a, rd As String Dim gender, hobbies As String gender = hobbies = "" f = txtname.Text
  • 28. l = txtlastname.Text a = txtaddress.Text If rbmarried.Checked = True Then rd = "Married" ElseIf rbunmarried.Checked = True Then rd = "UnMarried" End If If rbmale.Checked = True Then gender = "Male" ElseIf rbfemale.Checked = True Then gender = "Female" End If If cbread.Checked = True Then hobbies += "Read" End If If cbwrite.Checked = True Then hobbies += "Write" End If If cbspeak.Checked = True Then hobbies += "Speak" End If Dim selecteddate As Date selecteddate = dtpdateofbirth.Value Dim year As Integer = selecteddate.Year Dim month As Integer = selecteddate.Month Dim day As Integer = selecteddate.Day txtshow.Text = "First Name :" + f + " " + "Last Name :" + l + vbNewLine txtshow.Text += "Address : " + a + vbNewLine txtshow.Text += "Marital Status : " + rd + vbNewLine txtshow.Text += "Gender : " + gender + vbNewLine txtshow.Text += "EnglishAbility : " + hobbies + vbNewLine txtshow.Text += "Date Of Birth : " + day.ToString() + "/" + month.ToString() + "/" + year.ToString() + vbNewLine End Sub Private Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click txtname.Clear() txtlastname.Clear() txtaddress.Clear() End Sub Private Sub btnexit_Click(sender As Object, e As EventArgs) Handles btnexit.Click Me.Close() End Sub End Class
  • 30. 12) Develop the following form. When user clicks add button add the name in list box (Friend), using list box (Friend) enter selected name in another list box (Invite), also remove-selected name from list box Design:- Public Class exam
  • 31. Private Sub btnaAdd_Click(sender As Object, e As EventArgs) Handles btnaAdd.Click Dim item As String item = txtName.Text.Trim() lstbxfriendlist.Items.Add(item) End Sub Private Sub btnRight_Click(sender As Object, e As EventArgs) Handles btnRight.Click For Each item In lstbxfriendlist.SelectedItems lstbxSelectedfriendlist.Items.Add(item) Next If lstbxfriendlist.SelectedItems.Count > 0 Then For checked As Integer = lstbxfriendlist.SelectedItems.Count - 1 To 0 Step -1 lstbxfriendlist.Items.Remove(lstbxfriendlist.SelectedItems(checked)) Next End If End Sub Private Sub btnLeft_Click(sender As Object, e As EventArgs) Handles btnLeft.Click For Each item In lstbxfriendlist.SelectedItems lstbxSelectedfriendlist.Items.Add(item) Next If lstbxfriendlist.SelectedItems.Count > 0 Then For checked As Integer = lstbxfriendlist.SelectedItems.Count - 1 To 0 Step -1 lstbxfriendlist.Items.Remove(lstbxfriendlist.SelectedItems(checked)) Next End If End Sub Private Sub btnDoubleleft_Click(sender As Object, e As EventArgs) Handles btnDoubleleft.Click For Each item In lstbxSelectedfriendlist.SelectedItems lstbxfriendlist.Items.Add(item) Next
  • 32. If lstbxSelectedfriendlist.SelectedItems.Count > 0 Then For checked As Integer = lstbxSelectedfriendlist.SelectedItems.Count - 1 To 0 Step -1 lstbxSelectedfriendlist.Items.Remove(lstbxSelectedfriendlist.SelectedItems(ch ecked)) Next End If End Sub Private Sub btnDoubleright_Click(sender As Object, e As EventArgs) Handles btnDoubleright.Click For Each item In lstbxSelectedfriendlist.SelectedItems lstbxfriendlist.Items.Add(item) Next If lstbxSelectedfriendlist.SelectedItems.Count > 0 Then For checked As Integer = lstbxSelectedfriendlist.SelectedItems.Count - 1 To 0 Step -1 lstbxSelectedfriendlist.Items.Remove(lstbxSelectedfriendlist.SelectedItems(ch ecked)) Next End If End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Me.Close() End Sub End Class