Program to find the Case of a Chatacter in VB.NET

In this Program we are going to enter a Character and Display the CASE of the Character on Button Click on TextBox.

Program UI:

Screenshot (19)

Program Code :

Public Class Programmingfromscratch
Dim c As Integer

Private Sub btncheck_Click(sender As Object, e As EventArgs) Handles btncheck.Click
c = Asc(Textchar1.Text)
If (c >= 64 And c <= 91) Then  ‘ASCII VALUE
Textchar2.Text = “UPPER”
ElseIf (c >= 96 And c <= 122) Then
Textchar2.Text = “LOWER”
Else
Textchar2.Text = “Other Character”
End If

End Sub

Private Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click 
Textchar2.Text = “”
Textchar1.Text = “”
End Sub

End Class

Output:

Screenshot (20)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s