Results 1 to 8 of 8

Thread: accent thing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    71

    accent thing

    how would i make it so when somebody put an e in an rtf box, it would change to an é?
    Last edited by endusto; Jan 24th, 2004 at 12:05 PM.

  2. #2

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    71
    thanks that helps a lot, but if they put a k, how would i make it show |<

  4. #4
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564
    Find the ascii value of K and replace it with the 2 chars you need. Do a search on the web for ASCII and you will find a few character charts.

    Can probably even find them in Character Map on your PC.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    71
    lol, thats what i did, but i don't know how to put 2 chars

  6. #6
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564
    Try this

    VB Code:
    1. If keyascii = InsertAsciiCodeHere Then
    2.         RichTextBox1.SelText = "|<"
    3.         keyascii = 0
    4. End If

  7. #7
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,945
    Find the ascii value of K and replace it with the 2 chars you need. Do a search on the web for ASCII and you will find a few character charts.

    Can probably even find them in Character Map on your PC.
    To get an ASCII code simply type the following in the debug/immediate window:
    Code:
    print asc("character")
    ... and then press enter. The ASCII code should appear then.

    Also Visual Basic should have a chart some where in the help files.

    As for your other questions:
    Code:
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    Dim CursorPos As Integer
    CursorPos = Text1.SelStart
     If KeyAscii = Asc("e") Then Text1.Text = Text1.Text + Chr$(233): KeyAscii = Empty
     If KeyAscii = Asc("k") Then Text1.Text = Text1.Text + "|<": KeyAscii = Empty
    Text1.SelStart = CursorPos + 1
    End Sub
    
    The code probably is not the best sollution but I hope it will help you any way.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    71
    k, thanks i got my app working nicely, but now there is another problem. i want to put a ì into it for g, but it shows up as a ? any way to fix that?

    EDIT
    the g, with an accent turns into an ì here. but, it looks like a g normally, but it has an accent

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