|
-
Apr 8th, 2003, 12:56 AM
#1
Thread Starter
New Member
help with converter
well im basicly a noob too visual basic .NET and i need some help with this i wanted to try to make a text converter
this is what i have so far
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
textBox2.Text = ConvertMe(textBox1.Text)
End Sub
Function ConvertMe(ByVal textData as String) as String
Dim tempChar as String ' holds a character to compare to
Dim textConversion as String 'holds the converted text
textConversion = "" ' initialize empty string VB may already do this i don't know.
tempChar = textConversion.SubString(0,1) ' get the first char in the string
if tempChar = "a" Then
textConversion+= "4"
End If
return textConversion
End Function
but i cant seem to get it to work, ne help would be very nice
-
Apr 8th, 2003, 02:09 AM
#2
Sleep mode
Convert a string to what type ?
-
Apr 8th, 2003, 02:40 AM
#3
Sleep mode
Is this what you want ?
VB Code:
Private Function Changeto(ByVal str As String) As String
Dim ChangedStr As String = Nothing
ChangedStr = Replace(str, "e", "3", 1, 3, CompareMethod.Text)
MsgBox(ChangedStr)
End Function
'Usage
Changeto("phear")
-
Apr 8th, 2003, 02:21 PM
#4
Thread Starter
New Member
yea ill try to get that to work
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|