Professional Documents
Culture Documents
2022 Record
2022 Record
(Deemed to be University)
(Established Under section 3 of UGC act 1956)
Accredited with A+ Grade by NAAC in the Second Cycle
Coimbatore-641021.
(22CSU414A)
NAME :
REG.NO :
KARPAGAM ACADEMY OF HIGHER EDUCATION
Coimbatore-21
DEPARTMENT OF COMPUTER
SCIENCE
BONAFIDE CERTIFICATE
REG NO:
2 STRING MANIPULATION
3 MANIPULATE DATA
7 MDI CONTROL
8 EMPLOYEE DATABASE
9 EMPLOYEE REGISTRATION
10 CANTEEN ORDER
EX.NO:01
FACTORIAL OF A NUMBER USING FUNCTION
DATE :
AIM:
Algorithm:
Step 1:Open Microsoft Visual Studio 2012 and create a new windows form application.
STEP 2: Click the start to new project click visual basic to windows form applications
then click ok.
Step 3:Add the Label, Button and a TextBox inside theForm.
Step 4:Double click the button and do the following code inside the sub procedure for
getting factorial numbers.
CODING:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Dim n, f, i As Integer
f=1
n = Val(TextBox1.Text)
For i = 1 To n
f=f*i
Next
MsgBox(“Factorial is :” & f, vbInformation, “Factorial”)
End Sub
Form Design:
Output:
Result:
Thus the above program excuted successfully
EX.NO:02
STRING MANIPULATION
DATE :
AIM :
To write a VB.NET program to perform a string Handling Functions.
ALGORITHM :
STEP 1: Open a form and use necessary controls that are required for our applications.
STEP 2: Get two input strings from the user through the TextBox.
STEP 3: Perform the various string manipulation function.
STEP 4: Display the result.
STEP 5: Save and Run the application.
PROGRAM:
RESULT:
Various string manipulation has been performed.
EX.NO:03
DATE :
MANIPULATE DATA
AIM :
Develop a VB.NET program to create a form, place control and manipulate data.
ALGORITHM :
STEP 1: Open a form and use create controls that are required for form, two label, two
Textbox, Button application.
STEP 2: Get two input strings from the user through the TextBox.
STEP 3: The values using the equation Total=Val(Text1.Text)+Val(Text2.Text).
STEP 4: Display the result in the MsgBox.
STEP 5: Save and Run the application.
PROGRAM:
Public Class Form1
Dim form2 As New Form
Dim label1, label2 As Control
Dim txt1, txt2 As Control
Dim btnl As Control
Dim total As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
form2.Text = "Vn"
form2.Show()
form2.Size = New Size(500, 500)
Me.WindowState = FormWindowState.Minimized
End Sub
Private Sub btn1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
total = Val(txt1.Text) + Val(txt2.Text)
MsgBox(total)
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
label1 = New System.Windows.Forms.Label
label1.AutoSize = True
label1.Location = New System.Drawing.Point(90, 10)
label1.Size = New System.Drawing.Size(31, 51)
label1.TabIndex = 0
label1.Text = "Enter the mark 01 "
label1.ForeColor = Color.Black
label1.Font = New Drawing.Font("times new Roman", 14, FontStyle.Bold)
label1.Visible = True
form2.Controls.Add(label1)
label2 = New System.Windows.Forms.Label
label2.AutoSize = True
label2.Location = New System.Drawing.Point(90, 70)
label2.Size = New System.Drawing.Size(31, 51)
label2.TabIndex = 0
label2.Text = "Enter the mark 02"
label2.ForeColor = Color.Black
label2.Font = New Drawing.Font("Times new Roman", 14, FontStyle.Bold)
label2.Visible = True
form2.Controls.Add(label2)
txt1 = New System.Windows.Forms.TextBox
txt1.AutoSize = True
txt1.Location = New System.Drawing.Point(300, 10)
txt1.Size = New System.Drawing.Size(51, 71)
txt1.TabIndex = 0
txt1.ForeColor = Color.Black
txt1.Font = New Drawing.Font("times new Roman", 14, FontStyle.Bold)
txt1.Visible = True
form2.Controls.Add(txt1)
txt2 = New System.Windows.Forms.TextBox
txt2.AutoSize = True
txt2.Location = New System.Drawing.Point(300, 70)
txt2.Size = New System.Drawing.Size(51, 71)
txt2.TabIndex = 0
txt2.ForeColor = Color.Black
txt2.Font = New Drawing.Font("Times new Roman", 14, FontStyle.Bold)
txt2.Visible = True
form2.Controls.Add(txt2)
btnl = New System.Windows.Forms.Button
btnl.AutoSize = True
btnl.Location = New System.Drawing.Point(90, 130)
btnl.Size = New System.Drawing.Size(51, 71)
btnl.TabIndex = 0
btnl.Text = "Calculate"
btnl.ForeColor = Color.Blue
btnl.Font = New Drawing.Font("times new Roman", 14, FontStyle.Bold)
btnl.Visible = True
form2.Controls.Add(btnl)
AddHandler btnl.Click, AddressOf btn1_Click
End Sub
End Class
OUTPUT:
RESULT:
EX.NO:04
Text Editor using Rich Textbox
DATE
Aim:
To Creating a simple text editor with undo, redo, cut, copy, paste, select all,
find, replace, load file, and save file operations using Visual Studio, VB.NET,
and RichTextBox involves several steps.
Algorithm:
1. Create a new VB.NET Windows Forms Application:
- Open Visual Studio.
- Create a new Windows Forms Application project.
Coding:
Public Class Form1
Private filePath As String = ""
Private currentText As String = ""
Aim
To demonstrate use of methods and properties of listbox
Algorithm:
Aim
To demonstrate use of methods and properties of listView
Algorithm:
1. Open Visual Studio or any other VB development environment.
AIM:
To create MDI application having file menu (New, Open, Save, Print, Close) and Format
menu (Font, Forecolor, Backcolor).
ALGORITHM:
End Sub
End If
End Sub
End If
End Sub
End Sub
End Sub
End If
End Sub
End If
End Sub
End Class
OUTPUT
EX.NO:08
DATE:
EMPLOYEE DETAILS
AIM:
To write a VB.NET program for retrieving the employee details with the help of SQL
server.
ALGORITHM:
RESULT:
AIM:
To Create employee registration form to collect details (using radio button, checkbox and other
controls).
ALGORITHM:
End Sub
End Class
OUTPUT
RESULT:
Aim:
creating a simple Canteen Order Form in VB.NET. This form will use a ListBox to display selected
items and a ComboBox to list available food items.
Algorithm:
ComboBox2.Items.Add("1")
ComboBox2.Items.Add("2")
ComboBox2.Items.Add("3")
ComboBox2.Items.Add("4")
ComboBox2.Items.Add("5")
ComboBox2.Items.Add("6")
ComboBox2.Items.Add("7")
ComboBox2.Items.Add("8")
ComboBox2.Items.Add("9")
ComboBox2.Items.Add("10")
ComboBox2.Items.Add("11")
ComboBox2.Items.Add("12")
ComboBox1.Text = "select from...."
ComboBox2.Text = "select from...."
End Sub
End Sub
End Sub
End Sub
End Class
OUTPUT
Result :