Professional Documents
Culture Documents
Department of Computer
Science
LABORATORY MANUAL
FOR
Prepared By:
Ms. Alisha Jain
Assistant Professor
(Department of Computer Science Application)
INDEX
S.N Practical’s Name Date Remark
o
1 Design a form using listbox and textbox and perform
following operation- Add, Delete and Remove items.
2 Design a MDI Form.
Form 1
Form 2
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Me.Dispose()
End Sub
End Class
Form 3
fm4.Show()
End Sub
End Class
Form 1
Form 2
Form 3
Form 4
Q.3 Design a form using checkbox and radiobutton and display the text of selected checkbox
and radiobutton.
End Sub
End Sub
End Sub
End Sub
End Class
Q.5 Design a simple Text editor to perform cut , copy and paste operations.
Form 1
Public Class frmTextEditor
Clipboard.SetText(TextBox1.SelectedText)
TextBox1.SelectedText = ""
End Sub
End Sub
End Sub
End Class
Form 2
Public Class frmfind
If selStart = -1 Then
MsgBox("Can't find word")
Exit Sub
End If
frmTextEditor.TextBox1.Select(selStart, searchWord.Text.Length)
btnfindnxt.Enabled = True
btnreplace.Enabled = True
Btnreplaceall.Enabled = True
frmTextEditor.TextBox1.ScrollToCaret()
End Sub
If selStart = -1 Then
MsgBox("Can't find word")
Exit Sub
End If
selStart = frmTextEditor.TextBox1.Text.IndexOf(searchWord.Text,
frmTextEditor.TextBox1.SelectionStart + 1, StringComparison.Ordinal)
frmTextEditor.TextBox1.Select(selStart, searchWord.Text.Length)
End Sub
Private Sub btnreplace_Click(sender As Object, e As EventArgs) Handles btnreplace.Click
If frmTextEditor.TextBox1.SelectedText <> "" Then
frmTextEditor.TextBox1.SelectedText = Replacewith.Text
End If
End Sub
End Sub
End Class
Q.7 Design a form using textbox and horizontal scrollbar and change the background color
of the textbox as scrollbar is scroll.
Public Class Form2
End Class
Q.8 Create a database in ms-access.
Create a table and perform the following tasks.
Task to be performed
• Establish the connection to employee.mdb
• Display the first record of emp on TextBoxes used on form.
• Display all the records on DataGridView control.
End Sub
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Database1DataSet.employee' table. You can move, or
remove it, as needed.
Me.EmployeeTableAdapter.Fill(Me.Database1DataSet.employee)
End Sub
End Class
MS-ACCESS TABLE
employee
ID ename m_no
1 Alisha 89698678
2 diya 56476687
3 kavita 897686786
4 mukesh 785786768
Q.9 Design a simple calculator to perform Add, Subtract, Multiply and division operations.
Program:
ans = n1 / n2
txtans.Text = ans
End Sub