Results 1 to 8 of 8

Thread: [RESOLVED] how to twist alpha from eng 2 any

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2009
    Location
    IRaQ / BaghDaD
    Posts
    192

    Resolved [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

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2009
    Location
    IRaQ / BaghDaD
    Posts
    192

    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.

  4. #4
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: how to twist alpha from eng 2 any

    For example:

    Text2.Text = Replace(Text1.Text, "i" , "1")

    and so on.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2009
    Location
    IRaQ / BaghDaD
    Posts
    192

    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

  6. #6
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    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.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Nov 2009
    Location
    IRaQ / BaghDaD
    Posts
    192

    Re: how to twist alpha from eng 2 any

    Spoo Ur Fantastic


    Thnx For Ur Help

  8. #8
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    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
  •  



Click Here to Expand Forum to Full Width