1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Public Class frmMain
Private Sub btnConvert_Click(sender As Object, e As EventArgs) Handles btnConvert.Click
Dim strInput As String
Dim strFirstCharacter As String
Dim strOutput As String
Dim intLength As Integer = 0
strInput = txtWord.Text
strFirstCharacter = strInput.Substring(0, 1)
Select Case strFirstCharacter.ToUpper()
Case "A", "E", "I", "O", "U", "Y", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
strOutput = strInput & "-way"
Case Else
strOutput = strInput.Substring(1) & strInput.Substring(0, 1) & "ay"
End Select
strOutput.ToLower()
lblPigLatin.Text = strOutput
End Sub
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
Me.Close()
End Sub
End Class
|