Program to convert the Case of a String in VB.NET

Mid() in Visual is a string function that is used to extract a copy of                                     a character or set of characters from a string.

Function Mid( ByVal Str As String, ByVal Start As Integer,
Optional ByVal Length As Integer) As String

In the above syntax Str specifies the string from which the characters to be extracted from the starting position specified using Start, until the specifed Length of characters.

Program UI:

Screenshot (18).png

Program Code:

Public Class Task2

Private Sub btnoutput_Click(sender As Object, e As EventArgs) Handles btnoutput.Click
Dim len, i As Integer
Dim s, c As String
s = Textname.Text
len = s.Length
For i = 1 To len
c = Mid(s, i, 1)
If Asc(c) > 90 And Asc(c) < 123 Then
End If
End Sub

Private Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click
End Sub
End Class


Screenshot (17).png


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s