Showing posts with label visual basic.net palindrome. Show all posts
Showing posts with label visual basic.net palindrome. Show all posts

Sunday, April 24, 2016

Palindrome in Visual Basic.NET

A program that I wrote in Visual Basic.NET that will check if the given word by the user is a palindrome or not a palindrome.

 Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Sample Program Output


Program Listing

Public Class Form1

    Private Sub Find_Palindrome(ByVal strString As String)
        Dim str As String
        str = StrReverse(UCase(strString))
        If str.Equals(UCase(strString)) Then
            Label2.Text = UCase(strString) + " is a Palindrome."
        Else
            Label2.Text = UCase(strString) + " is Not a Palindrome."
        End If
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Label2.Visible = True
        Find_Palindrome(TextBox1.Text)
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Label2.Visible = False
        TextBox1.Focus()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Label2.Visible = False
        Label2.Text = ""
        TextBox1.Text = ""
        TextBox1.Focus()
    End Sub
End Class