0% found this document useful (0 votes)
18 views

HARINI_VB_RECORD2 - Copy

The document outlines various forms for a software application, including a price list, calculator, basic arithmetic operations, and a shopping mart interface. It describes the functionality of each form, such as user login, item selection, and payment processing. Additionally, it includes a traffic signal simulation and a game world project with scoring and game over conditions.

Uploaded by

meratalkarthi123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

HARINI_VB_RECORD2 - Copy

The document outlines various forms for a software application, including a price list, calculator, basic arithmetic operations, and a shopping mart interface. It describes the functionality of each form, such as user login, item selection, and payment processing. Additionally, it includes a traffic signal simulation and a game world project with scoring and game over conditions.

Uploaded by

meratalkarthi123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

PRICE LIST

Public Class Form1

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


MyBase.Load
DataGridView1.Rows.Add("TV", "50000")
DataGridView1.Rows.Add("AC", "45000")
DataGridView1.Rows.Add("Fridge", "20000")
DataGridView1.Rows.Add("Oven", "1000")
End Sub

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


System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
TextBox1.Text = DataGridView1.CurrentRow.Cells(0).Value
TextBox2.Text = DataGridView1.CurrentRow.Cells(1).Value

End Sub

Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


TextBox3.TextChanged
TextBox4.Text = Val(TextBox3.Text) - Val(TextBox2.Text)
End Sub

Private Sub paid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles paid.Click


Form2.Label5.Text = TextBox1.Text
Form2.Label6.Text = TextBox2.Text
Form2.Label7.Text = TextBox3.Text
Form2.Label8.Text = TextBox4.Text
Form2.Show()
End Sub

Private Sub clear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clear.Click


TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
End Sub

Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label5.Click

End Sub
End Class
OUTPUT:
CALCULATOR

Public Class Form1

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


MyBase.Load

End Sub

Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b1.Click

End Sub

Private Sub buttonclick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles b0.Click,


b1.Click, b2.Click, b3.Click, b4.Click, b5.Click, b6.Click, b7.Click, b8.Click, b9.Click, badd.Click, bsub.Click,
bmul.Click, bdiv.Click, bdot.Click, bclr.Click, bequal.Click
Dim button As Button = CType(sender, Button)
If button.Name = "b1" Then
TextBox1.Text = TextBox1.Text + "1"
End If
If button.Name = "b2" Then
TextBox1.Text = TextBox1.Text + "2"
End If
If button.Name = "b3" Then
TextBox1.Text = TextBox1.Text + "3"
End If
If button.Name = "b4" Then
TextBox1.Text = TextBox1.Text + "4"
End If
If button.Name = "b5" Then
TextBox1.Text = TextBox1.Text + "5"
End If
If button.Name = "b6" Then
TextBox1.Text = TextBox1.Text + "6"
End If
If button.Name = "b7" Then
TextBox1.Text = TextBox1.Text + "7"
End If
If button.Name = "b8" Then
TextBox1.Text = TextBox1.Text + "8"
End If
If button.Name = "b9" Then
TextBox1.Text = TextBox1.Text + "9"
End If
If button.Name = "b0" Then
TextBox1.Text = TextBox1.Text + "0"
End If
If button.Name = "bdot" Then
TextBox1.Text = TextBox1.Text + "."
End If
If button.Name = "bclr" Then
TextBox1.Text = ""
End If
If button.Name = "badd" Then
TextBox1.Text = TextBox1.Text + "+"
End If
If button.Name = "bsub" Then
TextBox1.Text = TextBox1.Text + "-"
End If
If button.Name = "bmul" Then
TextBox1.Text = TextBox1.Text + "*"
End If
If button.Name = "bdiv" Then
TextBox1.Text = TextBox1.Text + "/"
End If
If button.Name = "bequal" Then
Dim str As String = TextBox1.Text
Dim result = New DataTable().Compute(str, Nothing)
TextBox1.Text = result
End If
End Sub
End Class
OUTPUT:
BASIC ARITHMETIC

Public Class Form1

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button4.Click
r.Text = Val(a.Text) + Val(b.Text)
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button5.Click
r.Text = Val(a.Text) - Val(b.Text)
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
r.Text = Val(a.Text) * Val(b.Text)
End Sub

Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button7.Click
r.Text = Val(a.Text) / Val(b.Text)
End Sub
End Class
OUTPUT:
SHOP MART

FORM 1:

Public Class Form1

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


Button1.Click
Dim user As String
Dim pass As String
user = TextBox1.Text
pass = TextBox2.Text
If (user.Equals("harini") And pass.Equals("9705")) Then
MessageBox.Show("LOGIN SUCCESS", "INFORMATION", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Timer1.Enabled = True
Else
MessageBox.Show("ERROR", "INFORMATION", MessageBoxButtons.OK, MessageBoxIcon.Error)
TextBox1.Clear()
TextBox2.Clear()
TextBox1.Focus()
ProgressBar1.Value = 0
End If
End Sub

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


Button2.Click
TextBox1.Clear()
TextBox2.Clear()
End Sub

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


MyBase.Load
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 100
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick


ProgressBar1.Value = ProgressBar1.Value + 5
Label4.Text = ProgressBar1.Value & "%" & "completed"
If ProgressBar1.Value >= 100 Then
Timer1.Enabled = False
Me.Visible = False
Form2.show()
End If
End Sub
Private Sub ProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
ProgressBar1.Click

End Sub
End Class

FORM 2:

Public Class Form2


Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
PictureBox1.Click
Form3.Show()
Me.Visible = False
End Sub

Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


PictureBox2.Click
FORM4.SHOW()
Me.Visible = False
End Sub

Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


PictureBox3.Click
FORM5.SHOW()
Me.Visible = False
End Sub

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load

End Sub
End Class

FORM 3:

Public Class Form3


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Form6.TextBox1.Text = "GALAXY M53 5G"
Form6.TextBox2.Text = "60000"
Me.Visible = False
Form6.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
FORM6.TEXTBOX1.TEXT = "GALAXY A14 5G"
FORM6.TEXTBOX2.TEXT = "40000"
Me.Visible = False
FORM6.SHOW()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click


FORM6.TEXTBOX1.TEXT = " SAMSUNG GALAXY "
FORM6.TEXTBOX2.TEXT = "15000"
Me.Visible = False
FORM6.SHOW()
End Sub

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load

End Sub
End Class

FORM 4:

Public Class Form4


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Form6.TextBox1.Text = "MAC BOOK"
Form6.TextBox2.Text = "150000"
Me.Visible = False
Form6.Show()
End Sub

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


Button2.Click
FORM6.TEXTBOX1.TEXT = "HP"
FORM6.TEXTBOX2.TEXT = "70000"
Me.Visible = False
FORM6.SHOW()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button3.Click
FORM6.TEXTBOX1.TEXT = "DELL"
FORM6.TEXTBOX2.TEXT = "50000"
Me.Visible = False
FORM6.SHOW()
End Sub
End Class

FORM 4:

Public Class Form4


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Form6.TextBox1.Text = "MAC BOOK"
Form6.TextBox2.Text = "150000"
Me.Visible = False
Form6.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
FORM6.TEXTBOX1.TEXT = "HP"
FORM6.TEXTBOX2.TEXT = "70000"
Me.Visible = False
FORM6.SHOW()
End Sub

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


Button3.Click
FORM6.TEXTBOX1.TEXT = "DELL"
FORM6.TEXTBOX2.TEXT = "50000"
Me.Visible = False
FORM6.SHOW()
End Sub
End Class

FORM 5:

Public Class Form5


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Form6.TextBox1.Text = "TEDDY BEAR"
Form6.TextBox2.Text = "600"
Me.Visible = False
Form6.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
Form6.TextBox1.Text = "BARBIE"
Form6.TextBox2.Text = "300"
Me.Visible = False
Form6.Show()
End Sub

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


Button3.Click
Form6.TextBox1.Text = "CAR MODEL"
Form6.TextBox2.Text = "2000"
Me.Visible = False
Form6.Show()
End Sub
End Class

FORM 6:

Public Class Form6


Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
TextBox3.TextChanged
TextBox4.Text = Val(TextBox3.Text) * Val(TextBox2.Text)
End Sub

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


Button1.Click
Panel2.Visible = True
End Sub

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


Button2.Click
MessageBox.Show("THANK YOU", "INFORMATION", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
End Sub

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


Button3.Click
Form7.Label7.Text = TextBox5.Text
Form7.Label8.Text = TextBox1.Text
Form7.Label9.Text = TextBox4.Text
If RadioButton1.Checked = True Then
Form7.Label10.Text = " CASH ON DELIVERY"
ElseIf RadioButton2.Checked = True Then
Form7.Label10.Text = " ONLINE PAYMENT "
End If
Form7.Label11.Text = DateTimePicker1.Value
Form7.Show()
End Sub

End Class

FORM 7:

Public Class Form7

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


Button2.Click
Form2.Show()
End Sub

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


Button1.Click
Application.ExitThread()
End Sub
End Class
OUTPUT:

Form 1:

FORM 2:
FORM 3:

FORM 6:
FORM 6:

FORM 7:
TRAFFIC SIGNAL

Public Class Form1

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick


If red.visible = True Then
red.Visible = False
yellow.Visible = True
green.Visible = False
Timer2.Enabled = False
ElseIf yellow.Visible = True Then
red.Visible = False
yellow.Visible = False
green.Visible = True
Timer2.Enabled = True
ElseIf green.Visible = True Then
red.Visible = True
yellow.Visible = False
green.Visible = False
Timer2.Enabled = False
End If
End Sub

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


MyBase.Load
Timer1.Enabled = False
red.Visible = True
yellow.Visible = False
green.Visible = False
End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick


car.Left = car.Left + 2
End Sub

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


Button1.Click
Timer1.Enabled = True
End Sub

Private Sub car_locationChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


car.LocationChanged
If car.Left >= Me.Width Then
car.Left = 0
End If
End Sub
End Class
OUTPUT:
GAME WORLD PROJECT

Form 1:
Public Class Form1

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


Button1.Click
Me.Hide()
Form2.Show()
End Sub
End Class

FORM2:

Public Class Form2


Dim score As Integer = 0
Dim ran As New Random
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick


PictureBox1.Top -= 5
PictureBox2.Top -= 5
PictureBox3.Top -= 5
End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick


If PictureBox1.Location.Y < -60 Or PictureBox2.Location.Y < -60 Or PictureBox3.Location.Y < -60 Then
Me.Dispose()
Timer1.Enabled = False
Timer2.Enabled = False
MsgBox("GAME OVER")
Form1.Show()
End If
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
PictureBox1.Click, PictureBox2.Click, PictureBox3.Click
score = score + 1
Label1.Text = score
Dim x As Integer = ran.Next(30, 400)
Dim y As Integer = ran.Next(30, 400)
sender.location = New Point(x, y)
End Sub
End Class
OUTPUT:

FORM 1:

FORM 2:
NOTEPAD

Public Class Form1


Private Sub OpenToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles OpenToolStripMenuItem1.Click
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Text = My.Computer.FileSystem.ReadAllText(OpenFileDialog1.FileName)
End If
End Sub

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


Handles SaveToolStripMenuItem.Click
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, TextBox1.Text, False)
End If
End Sub

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


Handles PrintToolStripMenuItem.Click
PrintDialog1.ShowDialog()
End Sub

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


Handles ExitToolStripMenuItem.Click
End
End Sub

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


Handles UndoToolStripMenuItem.Click
TextBox1.Undo()
End Sub

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


Handles CutToolStripMenuItem.Click
TextBox1.Cut()
End Sub

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


Handles CopyToolStripMenuItem.Click
TextBox1.Copy()
End Sub
Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles PasteToolStripMenuItem.Click
TextBox1.Paste()
End Sub

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


Handles SelectAllToolStripMenuItem.Click
TextBox1.SelectAll()
End Sub

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


Handles FontToolStripMenuItem.Click
If FontDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Font = FontDialog1.Font
End If
End Sub

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


Handles ColourToolStripMenuItem.Click
If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.ForeColor = ColorDialog1.Color
End If
End Sub
Private Sub NewToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles NewToolStripMenuItem.Click
TextBox1.Text = " "
End Sub
End Class
OUTPUT:

You might also like