0% found this document useful (0 votes)
159 views9 pages

Hci Lab Assignignment 3

The document describes code for a login form and registration form created in Visual Basic for an HCI lab assignment. The login form code verifies a username and password, while the registration form code collects user information using various controls like textboxes, comboboxes, radio buttons, checkboxes and displays it in a message box. The message box code concatenates the collected user information into a formatted string to display in the message box.

Uploaded by

afsdf fdfsdf
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)
159 views9 pages

Hci Lab Assignignment 3

The document describes code for a login form and registration form created in Visual Basic for an HCI lab assignment. The login form code verifies a username and password, while the registration form code collects user information using various controls like textboxes, comboboxes, radio buttons, checkboxes and displays it in a message box. The message box code concatenates the collected user information into a formatted string to display in the message box.

Uploaded by

afsdf fdfsdf
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/ 9

HCI(LAB)

HCI [LAB ASSIGNMENT 3]

BY

Abdul Saboor
SP18-BCS-017
BCS-6C

Lab Assignment 3(10-nov-2020)

COMSATS University Islamabad, WAH

1
DESIGN :
Code for Login Form:
Public Class Form3

Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


If ((TextBox1.Text = "SABOOR") And (TextBox2.Text = "abc12")) Then
Dim f2 As New Form4
f2.Show()

Else
MessageBox.Show("INVALID PASSWORD or USERNAME")

End If
End Sub
End Class

Code for Registration Form:


Public Class Form4

Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click

End Sub

Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter

End Sub

Private Sub ListView1_SelectedIndexChanged(sender As Object, e As EventArgs)

End Sub

Private Sub Form4_Load(sender As Object, e As EventArgs) Handles MyBase.Load


Dim i As Integer

Dim myvar As String

For i = 1 To 31
ComboBox1.Items.Add(i)

Next

For i = 1980 To 2000

ComboBox3.Items.Add(i)

Next

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

Dim a, f As String
f = " "
If RadioButton1.Checked = True Then
a = RadioButton1.Text
ElseIf RadioButton2.Checked = True Then
a = RadioButton2.Text
ElseIf RadioButton3.Checked = True Then
a = RadioButton3.Text
ElseIf RadioButton4.Checked = True Then
a = RadioButton4.Text
End If

If CheckBox1.Checked = True Then


f &= CheckBox1.Text
f &= ", "
End If
If CheckBox2.Checked = True Then
f &= CheckBox2.Text
f &= " ,"
End If
If CheckBox3.Checked = True Then
f &= CheckBox3.Text
f &= ", "
End If
If CheckBox4.Checked = True Then
f &= CheckBox4.Text
f &= ". "
End If
MessageBox.Show("YOUR NAME: " + TextBox1.Text + vbLf + "DATE OF BIRTH: " +
ComboBox1.Text + "-" + ComboBox2.Text + "-" + ComboBox3.Text + vbLf +
"B.Tech: " + a + vbLf +
"SELECT UR BRANCH: " + ListBox1.Text + vbLf +
"CERTIFICATES SUBMITED: " + f)

End Sub

Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


Close()
End Sub

Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles


ListBox1.SelectedIndexChanged

End Sub
End Class

Code for Message box :


MessageBox.Show("YOUR NAME: " + TextBox1.Text + vbLf + "DATE OF BIRTH: " +
ComboBox1.Text + "-" + ComboBox2.Text + "-" + ComboBox3.Text + vbLf +
"B.Tech: " + a + vbLf +
"SELECT UR BRANCH: " + ListBox1.Text + vbLf +
"CERTIFICATES SUBMITED: " + f)

You might also like