VB 6 – UCase() and LCase()

In Visual Basic 6, there are two important functions to change a string to uppercase or lowercase. In this example, you will build a small application that takes a string and returns uppercase or lowercase version depending on user choice.

Advertisements

Program Code: UCase () and LCase()

First look at the code for first button – UpperCase.

Advertisements
Private Sub Command1_Click()
Text2.Text = UCase(Text1.Text)
End Sub

Now code for button – LowerCase.

Private Sub Command2_Click()
Text2.Text = LCase(Text1.Text)
End Sub

Output – UCase () and LCase()

Output - String Handling - LowerCase and UpperCase
Output – String Handling – Lowercase and Uppercase

Advertisements

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.