Check if a character is a vowel or not in vb.net
If you don’t know how to write a
program that will check the entered character is vowel or not then this post is
only for you because here I have given an easy solution for your program. If
you are interested in visual basic programming then you must know how to check
if a character is a vowel or consonant in vb.net. If you read this program
properly then you do not need to see any other example of this program because
here I have properly explained and given brief information for the vb.net program to check if a character is a vowel or consonant.
Steps for creating a vb.net program to check whether a character is vowel or not
- Open Microsoft visual studio.
- Create a new project.
- Draw one textbox to input the values.
- Draw two buttons one button for check character is vowel or not and another one is clear the textbox.
- After that write the code on the check button
- Then run the program.
Source code for the program of check if a character is a vowel or consonant in vb.net
Public Class Form1
Private Sub Button1_Click(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim c As Char
c = txtchar.Text
If Char.IsUpper(c) Then
MsgBox("Upper
case")
ElseIf Char.IsLower(c) Then
MsgBox("Lower
case")
End If
Select Case c
Case "A"
MsgBox("Vowel")
Case "E"
MsgBox("Vowel")
Case "I"
MsgBox("Vowel")
Case "O"
MsgBox("Vowel")
Case "U"
MsgBox("Vowel")
Case "a"
MsgBox("Vowel")
Case "e"
MsgBox("Vowel")
Case "i"
MsgBox("Vowel")
Case "o"
MsgBox("Vowel")
Case "u"
MsgBox("Vowel")
Case Else
MsgBox(" Not
Vowel")
End Select
End Sub
End Class
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
TextBox1.Text=""
Why do we need the create a program that is of checks if a character is
a vowel or consonant in vb.net?
Here this program has no more benefits but the main purpose of this
program is to increase logical skills. By using this program you can develop
a desktop application that will help with logical skills. Suppose you want
to develop the project for nursery school then in that application you can
develop a little game for kids by using the logic of this program.
This program will use for practical exams, if you are finding the visual
basic practical programs pdf then don’t waste your time searching anywhere
because here at allvbprograms we have given all types of visual basic programs
with codes and output that will help to solve your practical exam problems. If
you want to see some example of the visual basic program then you can see this
previous program How to write a program to convert numbers into words in visual basic 6.0 If you
practice these programs properly then you can easily solve these types’
questions in any exams because these are the one type of visual basic simple
programs.
I know what is you are thinking, if you are an advanced programmer then
maybe this program is useless for you. But this program is very useful for
beginners, if you are a beginner then join us now because we are always trying to
provide the best visual basic coding for beginners. Here you can get easily examples
of visual basic programs. If you want to visual basic programs PDF then you can
comment to me or contact me through the contact form.
How to work this program
If you saw the source code of this program properly then you noticed that
the working flow of this program is very easy. You just need to enter a character
in the textbox and click on the Display button. I think there doesn’t need to be brief
information for this program because this is not so hard program.
The additional part is added in this program is that when you are entering the character in the textbox then the output will also show the character is
uppercase or lower case. But that uppercase or lowercase does not matter in
this program. Here I have only focused on How to check if a character is a
vowel or consonant in vb.net
0 Comments