=================================Slip27_1=================================
Write a VB a program to accept a string from user if the
string contain any integer number that getreplaced by *.
========================================================================
Private Sub Command1_Click()
Dim str As String
Dim str1 As String
str = Text1.Text
str1 =
Replace(str, "9", "*")
str1 =
Replace(str1, "8", "*")
str1 =
Replace(str1, "7", "*")
str1 =
Replace(str1, "6", "*")
str1 =
Replace(str1, "5", "*")
str1 =
Replace(str1, "4", "*")
str1 =
Replace(str1, "3", "*")
str1 =
Replace(str1, "2", "*")
str1 =
Replace(str1, "1", "*")
str1 =
Replace(str1, "0", "*")
Text1.Text = str1
End Sub
No comments:
Post a Comment
Note: only a member of this blog may post a comment.