Dot Net Record
Dot Net Record
(SELF-FINANCE WING)
ERODE-638 316
NAME :
REGISTER NO :
CLASS :
SRI VASAVI COLLEGE, ERODE
(SELF-FINANCE WING)
ERODE-638 316
REGISTER NO:
This is to certify that this record work is done by
of III-B.sc (IT) at the Department of Information Technology in Sri Vasavi College
[Self-Finance Wing], Erode during the VI Semester of the academic year 2019-2020.
STATION : ERODE
DATE :
AIM:
To create an application to add a string to the textbox and move the same string to the
combo box when user clicks the button.
ALGORITHM:
STEP 2: Navigate to Start All Programs Microsoft Visual Studio 2008 Create New
Project.
STEP 3: Click Windows Form Application and rename the project in the dialog box and click OK.
STEP 4: Place 3 Labels, 2 Textboxes, 1 Combo Box and 2 Buttons in the form and change their
properties as per your preference.
STEP 5: Double click the button and write the program code to add string to textbox and move the
same text to combo box.
1
FORM DESIGN:
2
CODING:
End Sub
TextBox1.Text=””
TextBox2.Text=””
End Sub
End Class
3
OUTPUT:
4
EX.NO : 2
AIM:
ALGORITHM:
STEP 2: Navigate to Start All Programs Microsoft Visual Studio 2008 Create New
Project.
STEP 3: Click Windows Form Application and rename the project in the dialog box and click OK.
STEP 4: Place 2 Labels, 2 Tree View Controls and 2 Buttons in the form and customize their
properties.
STEP 5: Write the coding to display the hierarchical view of items with tree view control.
5
FORM DESIGN:
6
CODING:
Private ARRUG(5)
Private ARRPG(5)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
ARRUG(0)=”BSC(IT)”
ARRUG(1)=”BSC(CS)”
ARRUG(2)=”BSC(CDF)”
ARRUG(3)=”BCOM(CA)”
ARRUG(4)=”BCA”
ARRPG(0)=”MSC(IT)”
ARRPG(1)=”MCA”
ARRPG(2)=”MSC(CS)”
ARRPG(3)=”M.COM(CA)”
ARRPG(4)=”MSC(ELEX)”
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
7
OUTPUT:
8
EX.NO : 3
DATE : 07.01.2020 USER DEFINED EXCEPTION
AIM:
ALGORITHM:
STEP 2: Navigate to Start All Programs Microsoft Visual Studio 2008 Create New
Project.
STEP 3: Click Windows Form Application and rename the project in the dialog box and click OK.
STEP 5: Double click the button and write the coding using Try and Catch Exception
9
FORM DESIGN:
10
CODING:
11
Dim number As Double
Try
fn=Me.TextBox1.Text
sn=Me.TextBox2.Text
number=fn*sn
Me.TextBox3.Text=number
Catch ex As Exception
MsgBox(ex.Message & vbCrLf & “The operation could not be performed since the number you provided
is invalid”, MsgBoxStyle.OkOnly, “Invalid Operation”)
End Try
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
Dim fn As Double
Dim sn As Double
Dim number As Double
Try
fn=Me.TextBox1.Text
sn=Me.TextBox2.Text
number=fn/sn
Me.TextBox3.Text=number
Catch ex As Exception
MsgBox(ex.Message & vbCrLf & “The operation could not be performed since the number you provided
is invalid”, MsgBoxStyle.OkOnly, “Invalid Operation”)
End Try
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button5.Click
TextBox1.Text=””
TextBox2.Text=””
TextBox3.Text=””
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button6.Click
End
End Sub
End Class
12
OUTPUT:
13
EX.NO : 4 EMPLOYEE DETAILS USING CONSTRUCTOR
AIM:
To create a VB.NET program which reads and displays the Employee Details using
constructor and member functions.
ALGORITHM:
STEP 2: Navigate to Start All Programs Microsoft Visual Studio 2008 Create New
Project.
STEP 3: Click Windows Form Application and rename the project in the dialog box and click OK.
STEP 4: Place 4 Labels, 3 Textboxes, 1 List box in the form and customize the properties.
STEP 5: In Solution Explorer, right click the project and click Add Class.
14
FORM DESIGN:
15
CODING:
MyBase.New()
InitializeComponent()
ListBox1.Items.Add(“MOORTHI,BP-50000,DES_HR,EXPERIENCE-4 Years”)
ListBox1.Items.Add(“MUTHU,BP-40000,DES_HR,EXPERIENCE-3 Years”)
ListBox1.Items.Add(“SADHAM,BP-80000,DES_HR,EXPERIENCE-5 Years”)
ListBox1.Sorted=True
End Sub
TextBox1.Text=ListBox1.Items.Count
TextBox2.Text=ListBox1.SelectedIndex
TextBox3.Text=ListBox1.SelectedItem
End Sub
TextBox1.Text=””
TextBox2.Text=””
TextBox3.Text=””
End Sub
End Class
16
OUTPUT:
17
EX.NO : 5
AIM:
1. Click
2. Mouse Down
3. Down Key
4. Form Load
ALGORITHM:
STEP 2: Navigate to Start All Programs Microsoft Visual Studio 2008 Create New
Project.
STEP 3: Click Windows Form Application and rename the project in the dialog box and click OK.
STEP 4: Place 3 Labels, 2 Textboxes and 2 Buttons in the form design and customize their
properties.
STEP 5: Create the events for Click, Mouse Down, Down Key and Form Load.
18
FORM DESIGN:
19
CODING:
End Sub
Label3.Text=DateAndTime.Now
End Sub
If e.KeyCode=Keys.Down Then
Me.Close()
End If
End Sub
Me.BackColor=Color.Cyan
End Sub
End
End Sub
End Class
20
OUTPUT:
21
EX.NO : 6
AIM:
To create an application in VB.NET for the file menu with menu items such as Open, Save,
Print and edit menu items such as Cut, Copy, Paste, Undo and Redo.
ALGORITHM:
STEP 2: Navigate to Start All Programs Microsoft Visual Studio 2008 Create New
Project.
STEP 3: Click Windows Form Application and rename the project in the dialog box and click OK.
STEP 4: Place Context Menu Strip, Tool Strip, Print Dialog, Print Document, Open File Dialog
and Save File Dialog.
STEP 5: Right click the Menu Strip Tool and select insert standard items.
STEP 6: Write the codes for each and every menus and menu items.
22
FORM DESIGN:
23
CODING:
End Sub
Private Sub UndoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles UndoToolStripMenuItem.Click
RichTextBox1.Undo()
End Sub
RichTextBox1.Copy()
End Sub
24
Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles PasteToolStripMenuItem.Click
RichTextBox1.Paste()
End Sub
End If
End Sub
End Class
25
OUTPUT:
26
EX.NO : 7
AIM:
To create a VB.NET program to maintain the Student Database that connects with
Microsoft Access for adding, retrieving, viewing and updating the data.
ALGORITHM:
STEP 2: Navigate to Start All Programs Microsoft Visual Studio 2008 Create New
Project.
STEP 3: Click Windows Form Application and rename the project in the dialog box and click OK.
STEP 4: Place 6 Labels, 6 Text Boxes, 5 Buttons in the form and customize the properties.
STEP 5: Open Microsoft Access and create the following fields: Roll_No, Stud_Name, Reg_No,
Total_Marks, Average and Remarks.
STEP 8: Make the test connection success and write the code for each button.
27
FORM DESIGN:
FRONT-END (VB.NET)
BACK-END (MS-ACCESS)
28
CODING:
29
MsgBox(“Displayed”)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
cmd.Connection=con
cmd.CommandText=”Update table2 set Stud_Name “& TextBox2.Text &”, Reg_No=”& TextBox3.Text
&”, Total_Marks=”& TextBox4.Text &”, Average=”& TextBox5.Text &”,Remarks=”& TextBox6.Text
&” &”Where rollno=”& TextBox1.Text &””
cmd.ExecuteNonQuery()
MsgBox(“Updated”)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
cmd.connection=con
cmd.CommandText=”Delete from table2 where rollno=” & TextBox1.Text & “”
cmd.ExecuteNonQuery()
TextBox1.Text=””
TextBox2.Text=””
TextBox3.Text=””
TextBox4.Text=””
TextBox5.Text=””
TextBox6.Text=””
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button5.Click
TextBox1.Text=””
TextBox2.Text=””
TextBox3.Text=””
TextBox4.Text=””
TextBox5.Text=””
TextBox6.Text=””
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button6.Click
End
End Sub
End Class
30
OUTPUT:
VB.NET (FRONT-END)
MS-ACCESS (BACK-END)
31
EX.NO : 8
AIM:
ALGORITHM:
STEP 2: Navigate to Start All Programs Microsoft Visual Studio 2008 Click Create New
Website.
STEP 3: Click Windows Form Application and rename the project in the dialog box and click OK.
STEP 4: Place 5 Labels, 9 Textboxes and 1 Button in the form and customize their properties.
STEP 5: Double click the button and write the coding to display current date and time.
32
FORM DESIGN:
33
CODING:
Partial Class_Default
Inherits System.Web.UI.Page
TextBox1.Text=DateAndTime.Now
TextBox2.Text=”2567”
TextBox3.Text=”Chennai Express”
TextBox4.Text=”04.30 AM”
TextBox5.Text=”09.30 PM”
TextBox6.Text=”2568”
TextBox7.Text=”Blue Mountain”
TextBox8.Text=”04.30 PM”
TextBox9.Text=”06.30 AM”
End Sub
End Class
34
OUTPUT:
35