Results 1 to 5 of 5

Thread: ASCII help

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    I am trying right now to return the character equivalent of ASCII values in Windows. Problem is that some of them are different, e.g. Ñ in VB is 209 and in Windows is 165. how can I 1) return the Windows character for an ASCII code or 2) assign the result of SendKeys to a variable, since in Notepad pressing Alt-165 will return Ñ?

    thanks

    Andrew

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    try alt+0209
    Ñ
    tada!

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    Cool. But how can I assign that into a variable? I need to print all of the Windows Unicode characters from Ascii values 1 through 256 into an MSFlexGrid (or some other data viewer), and the code
    Code:
    Private Sub Command1_Click()
    
    Dim Text as String
    
    Text = SendKeys("Alt(0209)")
    
    End Sub
    gives a compile error - "Expected function or variable"
    gives the error

    Here is the problem, more simply put: I need to display the Windows Unicode Characters for 1 through 256. Since they are different from VB, how can I do this?


    [Edited by DrewDog_21 on 07-28-2000 at 04:55 PM]

  4. #4
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209

    Lightbulb

    Here's an Idea:
    You can just cut&paste the "odd" characters into list boxes in your project, and set the list box visibility to "False", and once they're needed, you can just transfer whats inside them to your text boxes by entering:
    Code:
    text1.caption=label1.caption

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Talking

    Maybe I am not being 100% clear about what I need to do, since I have written these in extreme haste

    Code:
    For i = 1 to 256
    
    'pass in the value of i and return the Unicode character.
     'this is where I am stuck because Chr(i) returns returns 
    'the VB character, and VB uses the ANSI character set and 
    'not Unicode 
    
    Next
    [Edited by DrewDog_21 on 07-28-2000 at 05:29 PM]

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