0% found this document useful (0 votes)
72 views34 pages

DNET

The document outlines a student's practical record for a .NET programming lab at S.M.S College of Arts and Science, including an index of programs completed with details on aim, algorithm, design, output and result for each program. It provides instructions and a template for students to document their work and results from programming exercises completed in the .NET lab.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views34 pages

DNET

The document outlines a student's practical record for a .NET programming lab at S.M.S College of Arts and Science, including an index of programs completed with details on aim, algorithm, design, output and result for each program. It provides instructions and a template for students to document their work and results from programming exercises completed in the .NET lab.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

S.M.

S COLLEGE OF ARTS AND SCIENCE


(Affiliated to Bharathiar University, Coimbatore)
SIRUVANI MAIN ROAD, PERUR,
COIMBATORE- 641 010.

DEPARTMENT OF COMPUTER SCIENCE

PRACTICAL RECORD NOTE

SEMESTER VI

DOT NET PROGRAMMING LAB

Register Number :

Name :

Class :
S.M.S COLLEGE OF ARTS AND SCIENCE
(Affiliated to Bharathiar University, Coimbatore)

SIRUVANI MAIN ROAD, PERUR,

COIMBATORE- 641 010

DEPARTMENT OF COMPUTER SCIENCE


SEMESTER - IV

REGISTER NUMBER

Certified that this is a bonafide record of work done by Mr. / Ms________________________

Submitted for the University Practical Examination held at S.M.S College of Arts and

Science on _________________________

STAFF-IN-CHARGE HEAD OF THE DEPARTMENT

INTERNALEXAMINER EXTERNAL EXAMINER


INDEX

S.NO DATE PROGRAM NAME PAGE.NO SIGNATURE

1 TEXT TO COMBO BOX

2 TREE VIEW

3 PAYOUT OF BOUNDS

EMPLOYEE DETAILS
4

MENU EVENT
5

MENU CRETAION
6

STUDENT MARKLIST
7

8
WEBSITE CREATION
EX.NO: 1

TEXT TO COMBO BOX


DATE:

AIM :

ALGORITHM :
PROGRAM :

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


Handles Button1.Click
ComboBox1.Items.Add(TextBox1.Text)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


Handles Button2.Click
TextBox1.Text =
""End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


Handles Button3.Click
End
End Sub
End Class
DESIGN:

OUTPUT:

RESULT :

The above program has been executed successfully.


EX.NO: 2

TREE VIWE
DATE:

AIM :

ALGORITHM :
PROGRAM :

PublicClassForm1

PrivateSub Button1_Click(ByVal sender AsSystem.Object, ByVal e


AsSystem.EventArgs) Handles Button1.Click
With TreeView1
.BeginUpdate()
.Nodes.Add("Bsc")
.Nodes(0).Nodes.Add("Computer Science")
.Nodes(0).Nodes.Add("Maths")
.Nodes.Add("Bcom")
.Nodes(1).Nodes.Add("Computer Application")
.Nodes(1).Nodes.Add("Information Technology")
.Nodes.Add("BA")
.Nodes(2).Nodes.Add("Tamil")
.Nodes(2).Nodes.Add("English")

End Update()

Endwith

EndSub

PrivateSub Button2_Click(ByVal sender AsSystem.Object, ByVal e


AsSystem.EventArgs) Handles Button2.Click
End

EndSub

EndClass
DESIGN:

OUTPUT:

RESULT :

The above program has been executed successfully


EX.NO: 3
PAYOUT OF BOUNDS
DATE:

AIM :

ALGORITHM :
PROGRAM :

Public Class PayOutOfBounds : Inherits Exception

Sub New()
MyBase.New("error occured due to insuficent funds")
End Sub
End Class

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


Handles Button1.Click
Dim amt As
IntegerTry
amt = Integer.Parse(TextBox3.Text)
If (amt < 100) Then
Label4.Text = "PLEASE ENTER CORRECT AMOUNT"
ElseIf (amt > 10000) Then

Throw New PayOutOfBounds


Else
Label4.Text = "PROCEEDING TO WITHDRAWL...PLS WAIT"
End If
Catch ex As PayOutOfBounds
Label4.Text = "***Caught PayOutOfBounds............CANNOT PROCEED***"
End
TryEnd
Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text= ""
TextBox3.Text=""
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)
Handles Button3.Click
End

End Sub

End Class
DESIGN:

OUTPUT:

RESULT :

The above program has been executed successfully.\


EX.NO: 4
EMPLOYEE DETAILS
DATE:

AIM :

ALGORITHM :
PROGRAM :

Public Class employee


Public ename, no, des, bp As String
Public hra, bpa, da, tot As Double
Public Sub New()
ename = InputBox("ENTER EMPLOYEE NAME")
no = InputBox("ENTER EMPLOYEE NUMBER")
des = InputBox("ENTER EMPLOYEE DEIGNATION")
bp = InputBox("ENTER EMPOLYEE BASIC PAY")
End Sub
Public Sub calculate()

bpa =
Integer.Parse(bp)

hra = (bp * 8) / 100


da = (bp * 4) / 100
tot = bpa + hra +
da
End
SubEnd
Class

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


Handles Button1.Click
Dim a As employee = New employee()
a.calculate()
Label2.Text =
a.enameLabel4.Text
= a.no Label6.Text =
a.des

Label8.Text = a.bp
Label10.Text = a.hra
Label12.Text = a.da
Label14.Text = a.tot
End Sub
Private Sub Button2_click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)
Handles Button2.Click

GroupBox1.Visible=False

End Sub
Private Sub Button3_click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)
Handles Button3.Click
GroupBox1.Visible=Tru
End Sub
Private Sub Button4_click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)
Handles Button4.Click
End
End Sub
End Class
DESIGN:

OUTPUT:
RESULT :

The above program has been executed successfully.


EX.NO: 5
MENU EVENT
DATE:

AIM :

ALGORITHM :
PROGRAM :

PublicClassForm1

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


Handles Button1.Click

MsgBox("YOU ARE USED BUTTON CLICKED EVENT")

EndSub

PrivateSub Form1_MouseDown(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.MouseEventArgs) HandlesMe.MouseDown

If e.Button = Windows.Forms.MouseButtons.Right Then

MsgBox("You Right Clicked on Form")

Else

MsgBox("You Left Clicked on the Form")

EndIf

EndSub

PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


HandlesMyBase.Load

MsgBox("Form Loading.............Click Ok Button")

EndSub

PrivateSub Form1_KeyDown(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.KeyEventArgs) HandlesMyBase.KeyDown

If e.KeyCode = Keys.F1 Then


MsgBox("You Are Pressed Help Key")

ElseIf e.KeyCode = Keys.F2 Then

MsgBox("You Are Pressed Save Key")

EndIf

EndSub

PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


Handles Button2.Click

Clos

e()

EndSub

EndClass
DESIGN:

OUTPUT:

RESULT :

The above program has been executed successfully.


EX.NO: 6

MENU CREATION
DATE:

AIM :

ALGORITHM :
PROGRAM :

Public Class Form1


Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e
As System.EventArgs) Handles NewToolStripMenuItem.Click
MsgBox("NEW MENU CLICKED")
End Sub

Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e


As System.EventArgs) Handles OpenToolStripMenuItem.Click
MsgBox("OPEN MENU CLICKED")
End Sub

Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e


As System.EventArgs) Handles SaveToolStripMenuItem.Click
MsgBox("SAVE MENU CLICKED")
End Sub

Private Sub PrintToolStripMenuItem_Click(ByVal sender As System.Object,ByVal


e As System.EventArgs) Handles PrintToolStripMenuItem.Click
MsgBox("PRINT MENU CLICKED")
End Sub

Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e


As System.EventArgs) Handles ExitToolStripMenuItem.Click
MsgBox("EXIT MENU CLICKED")
End Sub
Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e As
System.EventArgs) Handles CutToolStripMenuItem.Click
MsgBox("CUT MENU CLICKED")
End Sub

Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e


As System.EventArgs) Handles CopyToolStripMenuItem.Click
MsgBox("COPY MENU CLICKED")
End Sub

Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e


As System.EventArgs) Handles PasteToolStripMenuItem.Click
MsgBox("PASTE MENU CLICKED")
End Sub

Private Sub FindToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e


As System.EventArgs) Handles FindToolStripMenuItem.Click
MsgBox("FIND MENU CLICKED")
End Sub

Private Sub UndoToolStripMenuItem_Click(ByVal sender As System.Object,ByVal e


As System.EventArgs) Handles UndoToolStripMenuItem.Click
MsgBox("UNDO MENU CLICKED")
End
SubEnd
Class
DESIGN:

OUTPUT:
RESULT :

The above program has been executed successfully.


EX.NO: 7
STUDENT MARK LIST
DATE:

AIM :

ALGORITHM :
PROGRAM :

Public Class Form1

Private Sub STD_MarkBindingNavigatorSaveItem_Click(ByVal sender AsSystem.Object,


ByVal e As System.EventArgs) Handles STD_MarkBindingNavigatorSaveItem.Click

Me.Validate()

Me.STD_MarkBindingSource.EndEdit()

Me.TableAdapterManager.UpdateAll(Me.STDDataSet) End

Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs)


Handles MyBase.Load

'TODO: This line of code loads data into the 'STDDataSet.STD_Mark' table.
You can move, or remove it, as needed.

Me.STD_MarkTableAdapter.Fill(Me.STDDataSet.STD_Mark)End

Sub

Private Sub Mark3_TextBox_LostFocus(ByVal sender As System.Object, ByVale As


System.EventArgs) Handles Mark3_TextBox.LostFocus

TotalTextBox.Text = Convert.ToInt32(Mark1_TextBox.Text) +
Convert.ToInt32(Mark2_TextBox.Text) + Convert.ToInt32(Mark3_TextBox.Text)

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

End
End Sub
End Class
DESIGN:

OUTPUT:

RESULT :

The above program has been executed successfully.


EX.NO:8

WEBSITE CREATION
DATE:

AIM:

ALGORITHM:
PROGRAM:

PartialClass_Default

Inherits System.Web.UI.Page

ProtectedSub Button1_Click(ByVal sender AsObject, ByVal e


AsSystem.EventArgs) Handles Button1.Click

Label1.Text = DateTime.Now.ToString("dd-MM-yyyy h:mm

tt")EndSub

EndClass
DESIGN:

OUTPUT:

RESULT:
The Program has been executed successfully

You might also like