0% found this document useful (0 votes)
35 views5 pages

Assignment 1 To 14

1. The document contains code for 5 VB.NET assignments involving forms and buttons. 2. Assignment 3 contains a password form that checks a username and password against hardcoded values and tracks the number of failed attempts. 3. Assignments 1, 2, 4, and 5 contain code to display text from textboxes or messages based on values entered or conditions.

Uploaded by

prasad159
Copyright
© Attribution Non-Commercial (BY-NC)
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)
35 views5 pages

Assignment 1 To 14

1. The document contains code for 5 VB.NET assignments involving forms and buttons. 2. Assignment 3 contains a password form that checks a username and password against hardcoded values and tracks the number of failed attempts. 3. Assignments 1, 2, 4, and 5 contain code to display text from textboxes or messages based on values entered or conditions.

Uploaded by

prasad159
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 5

assignment 1

Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim text As String text = TextBox1.Text Label1.Text = text MsgBox("display:" & text) End Sub End Class

Assignment 2 enquiry form

assignment 3 password form


Password form Public Class Form1 Inherits System.Windows.Forms.Form Dim mcount As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim musername As String, mpassword As String musername = TextBox1.Text mpassword = TextBox2.Text If musername = "stp" Then Else MsgBox(" Incorrect User Name") End If If mpassword = "stpass" Then Else MsgBox(" Incorrect Password") End If mcount = mcount + 1 If mcount = 3 Then MsgBox("Count is : 3 , Access denied ") Me.Close() End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub

End Class

assignment 4
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim score As Integer Dim display As String display = TextBox1.Text score = 100 score = Int(TextBox1.Text) Label1.Text = display If score = 100 Then MsgBox("century") ElseIf score = 200 Then MsgBox("double century") ElseIf score >= 300 Then MsgBox("tripple century") Else MsgBox("score is: &score") End If End Sub End Class

assignment 5
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim score As Integer score = TextBox1.Text Select Case score Case 100 MsgBox("century") Case 200 MsgBox("double century") Case 300 MsgBox("triple century") Case Else MsgBox("score display:" & score) End Select End Sub End Class

You might also like