Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Topaz on August 02, 2005, 06:25 PM

Title: Chr() Reference codes
Post by: Topaz on August 02, 2005, 06:25 PM
I need a reference to a list of what all the Chr() refer to.
Title: Re: Chr() Reference codes
Post by: Yegg on August 02, 2005, 06:27 PM
What do you mean by that? A list of all possible values chr() can return? That's what it sounds like to me, correct me if I'm wrong.
Title: Re: Chr() Reference codes
Post by: MyndFyre on August 02, 2005, 06:45 PM
If that's the case, you could do something like:

(Have a text box called tb on your form)


Sub Form_Load()
  For i = 1 To 255
    tb.Text = tb.Text & vbCrLf & "Character" & i & ":  " & Chr(i)
  Next
End Sub


Note: I skipped 0 because I believe that Windows will stop writing text with the first NULL (Chr(0)).
Title: Re: Chr() Reference codes
Post by: Topaz on August 02, 2005, 08:04 PM
That crossed my mind, thanks :-]
Title: Re: Chr() Reference codes
Post by: K on August 02, 2005, 08:17 PM
Start -> Run -> "charmap"

The info bar at the bottom will tell you what the hexadecimal code is for the character. Note that it starts at 0x21 '!', which is the first "printable" character.
You're welcome.
Title: Re: Chr() Reference codes
Post by: Archangel on August 02, 2005, 10:13 PM
Quote from: K on August 02, 2005, 08:17 PM
Start -> Run -> "charmap"

The info bar at the bottom will tell you what the hexadecimal code is for the character. Note that it starts at 0x21 '!', which is the first "printable" character.
You're welcome.

I didnt knew that :o, awesome. thnx.
Title: Re: Chr() Reference codes
Post by: l)ragon on August 04, 2005, 01:58 PM
Quote from: MyndFyre on August 02, 2005, 06:45 PM
If that's the case, you could do something like:

(Have a text box called tb on your form)


Sub Form_Load()
  For i = 1 To 255
    tb.Text = tb.Text & vbCrLf & "Character" & i & ":  " & Chr(i)
  Next
End Sub


Note: I skipped 0 because I believe that Windows will stop writing text with the first NULL (Chr(0)).
Only does that in the .Net output windows
edit: thought you were (debug.print)ing heh
Title: Re: Chr() Reference codes
Post by: Tontow on August 04, 2005, 07:51 PM
Quote from: Topaz on August 02, 2005, 06:25 PM
I need a reference to a list of what all the Chr() refer to.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbstartpage.asp look on the left and go additional information->Reference->Charater set