|
-
May 19th, 2010, 11:31 AM
#1
Thread Starter
Addicted Member
[RESOLVED] how to twist alpha from eng 2 any
hi guys
how to twist a alpha from eng like ex 2 any alpha lang
Code:
Private Sub Command1_Click()
Dim i As Integer
If i = a Then i = z
Select Case i
Case a: Text1.Text = Text2.Text & " ش "
Case b: Text1.Text = Text2.Text & " لا"
Case c: Text1.Text = Text2.Text & " ؤ "
Case d: Text1.Text = Text2.Text & " ي "
Case e: Text1.Text = Text2.Text & " ث "
Case f: Text1.Text = Text2.Text & " ب "
Case g: Text1.Text = Text2.Text & " ل "
Case h: Text1.Text = Text2.Text & " ا "
Case i: Text1.Text = Text2.Text & " ه "
Case j: Text1.Text = Text2.Text & " ت "
Case k: Text1.Text = Text2.Text & " ن "
Case l: Text1.Text = Text2.Text & " م "
End Select
End Sub
and i hope some one heeelp me
-
May 19th, 2010, 01:39 PM
#2
Re: how to twist alpha from eng 2 any
Could you try and explain a bit more what you are trying to do please.
Is this correct: If i = a Then i = z
Did you mean "a" and "z" maybe, or is a a long type variable you declared somewhere?
Also, you don't set the value of i anywhere, Select Case will always go to the 0 value as that is what i will hold every time.
-
May 19th, 2010, 03:12 PM
#3
Thread Starter
Addicted Member
Re: how to twist alpha from eng 2 any
thnx for ur post
in this line
Code:
If i = a Then i = z
i want to apha from a - z
ok
and i want to like replace some alpha with another alpha
like if i wrote Like Ex :
Code:
if text1 = "Hi how r U" then
text2 = "H1 H0W r U"
end if
maybe is a German alpha or France alpha
ok i hope u got it
Last edited by DeadlyMan; May 19th, 2010 at 03:18 PM.
-
May 19th, 2010, 03:25 PM
#4
Re: how to twist alpha from eng 2 any
For example:
Text2.Text = Replace(Text1.Text, "i" , "1")
and so on.
-
May 19th, 2010, 03:36 PM
#5
Thread Starter
Addicted Member
Re: how to twist alpha from eng 2 any
but its just duplicate from text1 2 text2
i want to replace some word from text1 and view the word
like i sad
Code:
if text1 = "Hi how r U" then
text2 = "H1 H0W r U"
end if
-
May 19th, 2010, 03:50 PM
#6
Re: how to twist alpha from eng 2 any
Deadly
Do you mean you want to loop thru the characters
in a text string and replace them depending on the case?
Something like this maybe? It will
- "read" each character in Text1.Text
- create a new string Text2.Text with the replaced characters
Code:
Private Sub Command1_Click()
Dim ii As Integer
Dim nn As Integer
Dim txt as String
nn = Len(Text1.Text)
Text2.Text = Empty ' initialize new string as Empty
For ii = 1 to nn
txt = Mid(Text1.Text, ii, 1) ' reads 1 character at a time from Text1.Text
Select Case txt ' build new string Text2.Text
Case "a": Text2.Text = Text2.Text & " ش "
Case "b": Text2.Text = Text2.Text & " لا"
Case "c": Text2.Text = Text2.Text & " ؤ "
Case "d": Text2.Text = Text2.Text & " ي "
Case "e": Text2.Text = Text2.Text & " ث "
Case "f": Text2.Text = Text2.Text & " ب "
Case "g": Text2.Text = Text2.Text & " ل "
Case "h": Text2.Text = Text2.Text & " ا "
Case "i": Text2.Text = Text2.Text & " ه "
Case "j": Text2.Text = Text2.Text & " ت "
Case "k": Text2.Text = Text2.Text & " ن "
Case "l": Text2.Text = Text2.Text & " م "
End Select
Next ii
End Sub
Spoo
Last edited by Spoo; May 19th, 2010 at 03:55 PM.
-
May 19th, 2010, 03:55 PM
#7
Thread Starter
Addicted Member
Re: how to twist alpha from eng 2 any
Spoo Ur Fantastic
Thnx For Ur Help
-
May 19th, 2010, 03:58 PM
#8
Re: [RESOLVED] how to twist alpha from eng 2 any
Deadly
Glad it worked out 
Spoo
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
|