Prg_1TO25
Prg_1TO25
Prg_1TO25
NET)
US05CBCA04
Lblnm.visible=true
Lblnm.text="Welcome"
end sub
end class
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.
end sub
end class
O/P:
3) Accept two numbers using Inputbox on the click of the button and
display SUM of these two numbers using Msgbox.
end sub
end class O/P:
4) Design a form as shown below and perform the operations on the
numbers entered.
End sub
End sub
End sub
End class
If n > 0 Then
MsgBox("This is a Positive Number", vbInformation, "Result")
ElseIf n = 0 Then
MsgBox("This is a Zero Number", vbInformation, "Result")
Else
MsgBox("This is a Negative Number", vbInformation, "Result")
End If
End Sub
End Sub
O/P:
6) Write a program to find the maximum and minimum of given three
numbers.
Public Class Form1
O/P:
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.
Public Class Form1
'p=principle of amount
'r=rate of amount
'n=number of year
Private Sub BtnSI_Click(sender As Object, e As EventArgs) Handles Button1.Click
'p * r * n / 100
TxtResult.Text = Val(Txtprinciple.Text) * (TxtRate.Text) * (TxtNo.Text) / 100
End Sub
9). 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.
End Class
O/P:
Timer1.Start()
End Sub
LblTimer.Text = TimeOfDay
End Sub
End Class
O/P:
16) Design the following form:
Txtoutput.Text = UCase(TxtString.Text)
End If
End Sub
Txtoutput.Text = LCase(TxtString.Text)
End If
End Sub
Txtoutput.Text = Str(Len(TxtString.Text))
End If
End Sub
Txtoutput.Text = StrReverse(TxtString.Text)
End If
End Sub
End Class
O/P:
O/P:
11) Design the following calculator.
O/P:
End Sub
End Class
While i <= j
f = 0
For k = 2 To i / 2
If i Mod k = 0 Then
f = 1
End If
Next
If f = 0 Then
ListBox1.Items.Add(i)
End If
i = i + 1
End While
End If
End Sub
End Sub
O/P:
17) 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.
O/P:
18) 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.
TxtAll.Text = fname + " " + lname + ", " + address + ", " + status + ", " +
gender + ", " + english + ", " + d
End Sub
O/P:
19) Design following Form which shows use of Picture box.
O/P:
20) Design following Form which shows use of Horizontal and Vertical
Scroll Bar.
O/P:
21) Design following Form which shows use of Checked List box.
End Sub
Txtop.Text = s
End Sub
Private Sub BtnUnChecked_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Dim s As String
s = ""
For i = 0 To CheckedListBox1.Items.Count - 1
If CheckedListBox1.GetItemCheckState(i) =
CheckState.Unchecked Then
s = s + CheckedListBox1.Items(i).ToString()
End If
Next
Txtop.Text = s
End Sub
End Class
O/P:
22) Create a following form and insert a linked label on the form.
Public Class Form1
O/P:
23) Design following Form which shows use of Tree view control.
O/P:
O/P:
25) Design the Following Notepad using Menu editor & MDI form.
• Edit – Cut, Copy, Paste
• Format – Font, Bold, Italic, Underline, Color(submenu contains 2 options :
BackColor, Text Color)
• Find & Replace facility.
O/P: