INDEX
SL. Page
Date Name of the Program
No. No.
1 Dynamic Calculator
2 Puzzle Game
3 Text Editor
4 MDI Forms
5 Draw a Picture
6 OOP’s Concepts
7 Master Page Creation
8 Login Process
9 Cookies & Application Object
10 Validation Process
11 Session Object
12 AJAX controls
13 Student Mark List
14 Employee Salary Database
Staff
Signature
,
,VISUAL BASIC .NET
, EX.NO:
DATE:
1. DYNAMIC CALCULATOR
AIM:
To write a program for create Calculator using VB.NET.
PROGRAM:
Public Class Form1
Inherits System.Windows.Forms.Form
Dim WithEvents bn1, bn2, bn3, bn4, bn5, bn6, bn7, bn8, bn9, bn0,
bncancel, bnequal, bndot, pm, off As Button
Dim WithEvents bnplus, bnminus, bnmul, bndiv As Button
Dim firstvalue As Single
Dim op As Char
Dim WithEvents textdisplay, textdisplaytemp As TextBox
Private Sub form1_click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Activated
If (bn0 Is Nothing) Then
bn0 = New Button
bn0.Size = New Size(40, 40)
bn0.Location = New Point(120, 208)
bn0.Text = "0"
Controls.Add(bn0)
AddHandler bn0.Click, AddressOf Button_click
End If
If (bn1 Is Nothing) Then
bn1 = New Button
bn1.Size = New Size(40, 40)
bn1.Location = New Point(40, 168)
bn1.Text = "1"
Controls.Add(bn1)
AddHandler bn1.Click, AddressOf Button_click
End If
If (bn2 Is Nothing) Then
bn2 = New Button
bn2.Size = New Size(40, 40)
bn2.Location = New Point(80, 168)
bn2.Text = "2"
Controls.Add(bn2)
AddHandler bn2.Click, AddressOf Button_click
End If
If (bn3 Is Nothing) Then
bn3 = New Button
bn3.Size = New Size(40, 40)
bn3.Location = New Point(120, 168)
bn3.Text = "3"
Controls.Add(bn3)
AddHandler bn3.Click, AddressOf Button_click
End If
If (bn4 Is Nothing) Then
bn4 = New Button
bn4.Size = New Size(40, 40)
bn4.Location = New Point(40, 128)
bn4.Text = "4"
Controls.Add(bn4)
SL. Page
Date Name of the Program
No. No.
1 Dynamic Calculator
2 Puzzle Game
3 Text Editor
4 MDI Forms
5 Draw a Picture
6 OOP’s Concepts
7 Master Page Creation
8 Login Process
9 Cookies & Application Object
10 Validation Process
11 Session Object
12 AJAX controls
13 Student Mark List
14 Employee Salary Database
Staff
Signature
,
,VISUAL BASIC .NET
, EX.NO:
DATE:
1. DYNAMIC CALCULATOR
AIM:
To write a program for create Calculator using VB.NET.
PROGRAM:
Public Class Form1
Inherits System.Windows.Forms.Form
Dim WithEvents bn1, bn2, bn3, bn4, bn5, bn6, bn7, bn8, bn9, bn0,
bncancel, bnequal, bndot, pm, off As Button
Dim WithEvents bnplus, bnminus, bnmul, bndiv As Button
Dim firstvalue As Single
Dim op As Char
Dim WithEvents textdisplay, textdisplaytemp As TextBox
Private Sub form1_click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Activated
If (bn0 Is Nothing) Then
bn0 = New Button
bn0.Size = New Size(40, 40)
bn0.Location = New Point(120, 208)
bn0.Text = "0"
Controls.Add(bn0)
AddHandler bn0.Click, AddressOf Button_click
End If
If (bn1 Is Nothing) Then
bn1 = New Button
bn1.Size = New Size(40, 40)
bn1.Location = New Point(40, 168)
bn1.Text = "1"
Controls.Add(bn1)
AddHandler bn1.Click, AddressOf Button_click
End If
If (bn2 Is Nothing) Then
bn2 = New Button
bn2.Size = New Size(40, 40)
bn2.Location = New Point(80, 168)
bn2.Text = "2"
Controls.Add(bn2)
AddHandler bn2.Click, AddressOf Button_click
End If
If (bn3 Is Nothing) Then
bn3 = New Button
bn3.Size = New Size(40, 40)
bn3.Location = New Point(120, 168)
bn3.Text = "3"
Controls.Add(bn3)
AddHandler bn3.Click, AddressOf Button_click
End If
If (bn4 Is Nothing) Then
bn4 = New Button
bn4.Size = New Size(40, 40)
bn4.Location = New Point(40, 128)
bn4.Text = "4"
Controls.Add(bn4)