Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Display Ascii Character Over Code No.128 ?


My platform is VB6 on windows 98 ( chinese version )
I would like to display in a VB form the ascii character over code no. 128, such as chr(136), chr(137), etc.
I cannot display the correct character by using the chr function.
Does anyone know how to do ?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Make A Text Box Display Ascii Character
i have a text box that receives the ascii character's sent by a server but it only receives the first ascii character and the others are not displayed ..how to make it display the total ascii character sent by the server ???

How To Store & Read The Display Pattern For Each ASCII Character??
Hi out there...
I have something to ask about my programming stuff. Currently i am using visual basic 6.0 to do my programming.

What i want is like that:

Base on an ASCII character, my program will able to find the pattern that represent the character and display it on the dot matrix array.

How am i going to store all the patterns for each of the ASCII character?
Eg. for the character 'A', the equivalent display pattern is [c1,b7,77,b7,c1].
*Note: all display pattern is in hex.

How am i going to retreive the pattern for each ASCII character?
Eg. for the character 'A', the display pattern [c1,b7,77,b7,c1] will be send out to the dot matrix array.

Thanks!!

Ascii Code For Character
Hi All,

I have a listbox displaying all character. When i click on 1 of therecord from the listbox, eg. "a" it will give me the ascci 97. But iencounter problem whereby it will give me ascii as "0" for everycharacter. Can anybody help me? Below is my code

Private Sub List1_Click()
Dim keyascii As Integer

Text1 = List1
Text2 = keyascii

End Sub

I'll not encounter this problem if i assign a value into text1, it willgive me the correct ascii.



Private Sub text1_KeyPress(keyascii As Integer)
Text2 = keyascii
End Sub

Thanks.

Rgds,
Khai Sze

Inserting ASCII Character By Code
Hi guys and girls,
At this point I feel quite stupid for putting this on the forum, but I simply can't find a solution.

What I want, is to enter non-alphabet ASCII characters in a cell by code. For example "√" (Alt+251) (which is what I specifically need in this case) can be entered using the keyboard. But when I use the macro recorder on this I get "v" in my code and also in the cell. Another thing I tried was changing the font to something like "Symbol". That indeed changes the "v" to a symbol, so there possibly is a character in that font like "√". But that means that the rest of the cell is also in that font.

Edit: OK, just found out that you can use several fonts in one cell.

In short, how do I enter "√" in a cell without changing the font?

Thanks for any help.

2nd Edit: Why isn't "√" in ASCII according to VBA help?

Convert ASCII Code To Character
I am able to get the ASCII code for a character by using the Asc function, but how do I go about getting the character for that ASCII code? If there a command that is pretty much the opposite of Asc?

-Matt.
<('.')>
"Unthinking respect for authority is the greatest enemy of the Truth."

Convert Character To Ascii Code?
hi,

Is there anybody help me on this.
How can i convert Character A or B or C and other, to ASCII code

Thank you very much
Regards
Ooi

Vb - Label Display Ascii Code ?????
Hi,
i'm trying to show in a VB label the ASCII code CHR(179) but i cannot display anything else than a 3 . How can i solve this problem?
thank you.
I'm trying to display old DOS programs in VB,and i need to display all the ascii code such as the chr(191) etc.
thank you a lot.
ciao max
:b

Display A File Character By Character In Text Box?
I have opened a file as follows and used "Common Dialog Control" (CD1). Now, I want to display the opened file character by character in a Text Box.

I have done following, but it is displaying just few first characters or the last ones.
------------------------------
CD1.ShowOpen
Text1.Text = CD1.FileName

Open Text1.Text For Input As #1
Do While NOT EOF(1)
Input #1, c
Text2.Text = c
Loop
Close #1
--------------------------------

ASCII Character
I need to include this character "Σ" in my data report. When I type ALT+228 in a text file, it returns Σ. But when I tried to type it in a VB form or label, it returns the character "S". Then I tried to call the character by typing tis code


Code:
label.caption = CHR(228)
it returbs the character ""!!

Im wondering whether there is any setting I need to change. or is there any idea where I can include the character "Σ" in my vb project.

Character To ASCII
Can someone please give me some code to convert characters to ascii in vb

Ascii To Character?
I have a string of html ascii codes pulled from a web page using an inet control. An example would be..

Dim Str As String
Str = Inet1.OpenURL("http://www.example.com")

Which would make a string like this..

Str = "&#104;&#105;" (replace & with & as i cannot because the browser will recognise the code and it will output the actual letter)

I then need to convert these to characters.. so the above example would output 'hi'. I have tried using Chr(Str) but this does not work. Any ideas?

ASCII Character
old dos program use ASCII character to draw line or table,

but when i open it as txt file in vb, it won't show the line, how to see the line or table in vb, is it font name problem?

Character To Ascii
does anyone know how to take a letter in a string and find its ascii code? I only know how to take an ascii code and get the character.

ASCII Character
Hi,does anybody know what is an ascii character fro formfeed
Thanx

Character To Ascii
How do I change an individual character to it's Ascii value?

I am looping through the length of a string and getting each character and want to know the Ascii value for each character.

How Do You Figure Out What ASCII Character Something Is?
I have a file that I'm sending through a serial port. I can't modify the file at all. In the file there are several square boxes. I've learned that these are characters such as vbLF or vbCR and such. One of them, the very last one in the file, I've yet to find out what it is.

I've attached the file, could someone either tell me how to find out, or tell me what character it is.... preferrably both. =)

Find The Ascii Character
Does anybody knows the opposite of the Asc() function?
(Give an integer and take the character)

Print ASCII Instead Of Character
Hi,
Let's say sString="aAbBcC", how would I print that string on a msgbox in ASCII?

Thanks,

PhiL

Ascii Character Codes In VB
Related to my previous post, I am trying to write a program that creates html files. How can I get VB to write a quotation mark when it is part of a line such as:

<SCRIPT language="JavaScript">

in the VB code, it looks something like:

PRINT #1, "<SCRIPT language=" + ?? + "Javascript" + ?? + ">"

but I'm not sure how to code the ?? to print a quotation mark in the final external html file.

Thanks.

Ascii Character For Euro
Hey all, can anyone tell me if there is an ascii character for the Euro sign ?? I've googled the net for the ascii character set and searched this forum and can't find anything...... thanks !

Print ASCII Instead Of Character
Hi,
Let's say sString="aAbBcC", how would I print that string on a msgbox in ASCII?

Thanks,

PhiL

Search For A Particular Ascii Character
I what to search a piece of text for a particular ascii character, I have tried
Code:
If InStr(0, strFile, Chr$(10)) Then ......
'And
If InStr(0, strFile, Asc(10)) Then ......
'And
If InStr(0, strFile, Asc("10")) Then ......
Ascii Code 10 - Line Feed, the character I'm looking for, but it doesn't work. Any suggestions

ASCII Character For Bold
Hi,

Can anyone tell me what is the Character code to make a text bold.

Thanks in advance
Radhika

Insert Ascii Character Codes
Most people want to remove ascii codes for special characters but I want to replace the special characters in a Word document with their ascii codes. Is there any automated way to do this? Or do I have to search for the characters and replace with their ascii coade text string?

Converting Ascii Character To Integer
Hi all...

I am recieving ascii characters from the coms port and i would like to be able to convert them to a interger value.

How would i go about achieving this??

Thanks heaps,
Someone

Print Ascii Character On The Screen
Here is another similar question. How would you get it to print the character of an ascii code? Meaning something like Asc(65) would print "A" on screen?



Never mind i got it....

(SOLVED) Ascii Of Control-Z Character Help?
I need to write to a text file the control-Z caracter.
Is any ascii code for that?

Actualy I need to send it to the comm port using mscomm control.
I have connect my mobile phone on comm port and I use mscomm control to send some AT commands that send an SMS.
The last command that I need to send is the control-z.

thks in advance


elias

Numeric,ascii, Character -separation
hi all
hi have a 200 field width of word which contains numeric,charaters,ascii codes, again numeric,charater, i need to separate the above line and to store in a separater above siad fileds as numeriic,ascii,charcter,nueric,character, that too the word is not same length , replies will be helpful..
cheers
parthi

Character Codes(ansi Or Ascii)
I can't figure out the stupid command for extracting the character code for a character...

is it Chr()?

Ascii Character & Tabstrip Control
Does anyone have a tabstrip example to show how to build a tab control in a step-by-step example?
I'm stuffed if i can get these to work.

Also does anyone know why when i put in the ascii character 153 (trademark symbol) all i get is a thick vertical line? as a matter of fact none of the characters between 150 to 159 work.
I can get the copyright symbol (169) and the registered symbol (174) to work ok but not the trademark one.
I'm using them all like this Chr(169)

Can anyone help?

Ascii Character Set Functions In Text Boxes
Help!!

I am trying to edit some text in a text box by using the ascii codes for the editing functions i.e. chr(8) for delete etc, at the moment when i write the following:

textbox.text = textbox.text & chr(8)

instead of deleting the last character a black rectangle appears, which i guess means the the command is being written as its character rather than its function.

How can i get over this problem??

ps i also want to use the controls for tab, shift, shift lock and the other general keyboard function keys.

Removing A Single Ascii Character On A Form
If I use the following code on a form with Courier New or Terminal as it's font, and the form's scalemode set to Character, the second character does not replace the first one, which makes sense. But I want it to. So is there some way of clearing just that 10,10 coor of whatever's there without having to use BitBlt? Or must I use BitBlt? And I can't use Me.Cls

Me.CurrentX = 10
Me.CurrentY = 10
Me.Print "A"
Me.CurrentX = 10
Me.CurrentY = 10
Me.Print " "

Limiting The Number Of A Particular Ascii Character In A Text Box?
Hello,

Can anyone tell me how I can limit the number of times that an Ascii character can occur in a text box?

Thanks, Bruce

Manipulating Individual Character's ASCII Values
I was wondering if there's a command to manipulate the ascii value of specific characters in visual basic. It's a fairly simple process in other more complex languages.

The problem that I have is that I am making a curriculum for a summer camp teaching grade 6-8 students the basics of programming. The project I wanted to do was to write a simple encode/decode program in visual basic that the kids could create a windowed exe file they could execute at home but the best way I know how to encode a basic text message is to manipulate the ascii value. If there's any more project ideas out there or another way to encode that would be welcome as well as letting me know if there is a way to maniuplate character ascii values.

How To Display Non-printable ASCII Characters
I am trying to display ASCII characters in a label, and those ASCII characters may not neccesarily fall into the range of printable characters. In other words, my form has a combo-box that lets the user pick any number between 1 and 255, and I will then display what the CHR(cboNumber.text) value LOOKS LIKE in a standard DOS screen. This works fine if the value is above 32 and below 127, but I ALSO want to display what the other characters look like as well as viewed in the DOS edit screen (THUS a chr(28) looks like an L on it's back etc.) I have found that I can change the characterset "charset" to 255, but that only works IF THE FONT SUPPORTS that character set, and after a dozen fonts, I may be on a wild goose chase. Any ideas!

How To Display The Char Whose ASCII Value Ranges From 1 To 31?
Dear all,
I am working on a VB program which allows the user to type in any chars whose ASCII values range from 1 to 255. But, it seems the TextBox or Rich Text Box that VB carries can NOT display some of the chars with ASCII values ranging from 1 to 31. For example, ATL+1 can not display the SOH char in the text box. But, I do have a program in hand whose text box can display SOH as a smilling face. I don't know what operation is taken behind the scene. Is there a way for my VB program to display those chars with ASCII value 1 to 31? Please advise and thanks in advance...

Tracy

Character Display....
Anybody knows what i have to do in order to write greek in my vb applications? when i try to do that awkward characters are displayed. If tried anything in my regional/language settings but still nothing. The weird thing is that this problem doesn't come up in other pcs.

Global Events For Keyboard SCAN CODE &amp; ASCII CODE Event Trapping?
OK, don't be mad at me, if this is a stupid question, but I'm quite new to VB, so here's my Q:
Is there any global event (not KeyUp/KeyDown/KeyPress) to trap keyboard keypresses with SCAN codes? It is very important to have the exact scan code. I want to use an API function to simulate the pressed keys on an other machine, and I need to have the scan code. By the way, API function calls won't do it for me, I need an EVENT! (I don't want to call functions over and over again e.g. in a timer event. This is too -slow-)
So if anyone out there can help me, please do!
You won't regret it!

Thanks to all....

Character Display Problems
Hi,

Many of you will know that the space character can be "trimmed" using he Trim() Function. However, I am looking for a character that is displayed as nothing or invisble or a space and CANNOT be trimmed using the Trim() Fucntion.

Also, whats the most popular character used to deliminated data values within a text value.

Thanks in Advance,
VD

Display Chinese Character In VB
Hi All,

I am stucked in how to display chinese character in VB. for example, i created a form and ask form input in chinese.. the program ables to view chinese when inputting, but once i saved into database and then retrieve back from the database, it goes wrongly, can't display the correct chinese... why? how to solve this problem? please help me in urgent!!


Thanks and regards,
Frankie

MsComm1 Display Character
Hi,

how to display character from Mscomm1.input?

Example.

VB Code:
Text1.text = Mscomm1.input


Br

Display How Many Of Each Character Is In A Word?
Lets say you had poop

there is actually only 2 characters in this word...p and o
so how could i take that and have it tell me how many of each character is in the word.....
e.i type in the word LEVEL
button is pressed, msgbox retunrs L(2), E(2) V(1)
there are 2 l's 2 e's and 1'v

thanx in advanced

Generate An Ascii Code From Vb Code And Vise Versa
hello,
i working in a project where i should read ascii code using the vb to generate the result on excel and vise versa, generate the ascii code using vb

any one have already did this?

thanks for the help

Best Control To Use To Display Contents Of An ASCII Text Appending File?
Hi,

I have a chemical analyser grinding out results for several process streams. As part of saving historical data, I format the results from each analysis into an ASCII string with timestamp, and then append the string to the appropriate sample file.

What is the easiest way to allow the user to scroll through such files?

For event logging, I have set up a series of text lables (15 say) and the used a vertical scroll bar to dispaly 15 of the last 200 events. The events are stored in a circular buffer, which contains the last 200 events. This works well, as I can color each line to indicate the type of event (yellow on red for error, white on green for result, white on blue for standard..). But the coding is fairly complex and am looking for a simple display of analytical results for a given sample stream.

In the case of the anlysis results, the data is appended, so the file just keeps growing. Presumably, monthly files will be separated and stored.

Display Chinese Character Or Image On Msg Box
Is it possible to display chinese character on MsgBox? I have tried to display chinese character, but it failed. I was wondering, can i display a image on the MsgBox? Is there such a thing?

thanks,
eve

Display Hindi Character In Menu
hi there i am trying to make my own browser,but with hindi language interface.so,all the menu name will be in hindi character.how can i do this.i put hindi unicode characters in the menu,but when i run the vb program,i see ??? all over the menu. a company called webdunia.net have the product i am trying to make.u can download the trial version of browser from their site.my browser will be based in internet explorer.i have no problem making it in english,but now i want to make the menu name in hindi.i will put a menu called language in the top which will have english and hindi .so when the user clicks hindi ,all the menu name should be displayed in hindi language.

hope someone will help me on this


ram

Display Chinese Character On VB Form
Hi,
I like to display chinese character on a VB form. I wonder if it is possible to enter the Chinese character using Chinese Star. Will the Chinese character shows if the program is used on another computer without chinese software? Are there any other methods of displaying chinese character in VB form?
Thanks

URGENT - How To Change The Display Mode (ascii, Ansi, Unicode, Etc) In A TextBox?
Hi,

I wrote a VB program to communicate with a microcontroller (AT89C51) through RS232 port (COM1). When the program sent a character 'p', the microcontroller responded by sending a string, which formed by a character arrays, to PC byte-by-byte as follows:

'p', '5', '2', ',', '3', '6', '0', '
', ' ', 'o', 'k', '
', ' ', '>', 'p', '5', '2', ',', '3', '6', '0', '
', ' ', 'o', 'k', '
', ' ', '>'
...which is equivalent to "p52,36,0
ok
>p52,36,0
ok
>"

note:
'
' = carriage return (CR)
' ' = space

The program displayed the received string using a TextBox control. The string was not displayed properly as expected. The displayed string was copied and pasted into NOTEPAD (ANSI, UNICODE), Ultraedit (ASCII, UNICODE). Hyperterminal (Windows XP Pro) was also used to display the string sent from microcontroller.

String displayed in TextBox control:
p52,36,0 ok >p52,36,0 ok >

String displayed in Hyperterminal:
p52,36,37
ok
>p52,36,37
ok
>

String copied to Notepad (saved as ANSI):
p52,36,0 ok >p52,36,0 ok >

String copied to Notepad (saved as UNICODE):
p52,36,0 ok >p52,36,0 ok >

String copied to Ultraedit (saved as ASCII):
p52,36,0
? ok
? >p52,36,0
? ok
? >

String copied to Ultraedit (saved as UNICODE):
p52,36,0
ok
>p52,36,0
ok
>


Summaries

[1] Displays shown in the VB program and Hyperterminal are DIFFERENT. The carriage-returns (CRs) are ignored in TextBox control.
[2] Displays of pasted string in both Notepad (ANSI) and Notepad (UNICODE) are SAME.
[3] Displays of pasted string in Ultraedit (ASCII) and Ultraedit (UNICODE) are DIFFERENT. The CRs in string pasted in Ultraedit (ASCII) are replaced by '?'.
[4] Displays of pasted string in Notepad (UNICODE) and Ultraedit (UNICODE) are DIFFERENT even though both are saved as UNICODE mode.


Questions

[1] Why CRs are ignored in VB TextBox control?
[2] Why texts shown in UNICODE mode in different softwares, e.g. Notepad and Ultraedit, are DIFFERENT?
[3] Please advise how to make the received string shown in TextBox control to be SIMILAR to that of Hyperterminal.
[4] What are the differences among ANSI, UNICODE and ASCII text?


I used the following code to display the received string to TextBox or txtReceive:

Code:
Private Sub MSComm1_OnComm()

If (MSComm1.CommEvent = comEvReceive) Then
txtReceive.Text = txtReceive.Text + MSComm1.Input
End If

End Sub


Thank you very much!


TQvM

URGENT - How To Change The Display Mode (ascii, Ansi, Unicode, Etc) In A TextBox?
Hi,

I wrote a VB program to communicate with a microcontroller (AT89C51) through RS232 port (COM1). When the program sent a character 'p', the microcontroller responded by sending a string, which formed by a character arrays, to PC byte-by-byte as follows:

'p', '5', '2', ',', '3', '6', '0', '
', ' ', 'o', 'k', '
', ' ', '>', 'p', '5', '2', ',', '3', '6', '0', '
', ' ', 'o', 'k', '
', ' ', '>'
...which is equivalent to "p52,36,0
ok
>p52,36,0
ok
>"

note:
'
' = carriage return (CR)
' ' = space

The program displayed the received string using a TextBox control. The string was not displayed properly as expected. The displayed string was copied and pasted into NOTEPAD (ANSI, UNICODE), Ultraedit (ASCII, UNICODE). Hyperterminal (Windows XP Pro) was also used to display the string sent from microcontroller.

String displayed in TextBox control:
p52,36,0 ok >p52,36,0 ok >

String displayed in Hyperterminal:
p52,36,37
ok
>p52,36,37
ok
>

String copied to Notepad (saved as ANSI):
p52,36,0 ok >p52,36,0 ok >

String copied to Notepad (saved as UNICODE):
p52,36,0 ok >p52,36,0 ok >

String copied to Ultraedit (saved as ASCII):
p52,36,0
? ok
? >p52,36,0
? ok
? >

String copied to Ultraedit (saved as UNICODE):
p52,36,0
ok
>p52,36,0
ok
>


Summaries

[1] Displays shown in the VB program and Hyperterminal are DIFFERENT. The carriage-returns (CRs) are ignored in TextBox control.
[2] Displays of pasted string in both Notepad (ANSI) and Notepad (UNICODE) are SAME.
[3] Displays of pasted string in Ultraedit (ASCII) and Ultraedit (UNICODE) are DIFFERENT. The CRs in string pasted in Ultraedit (ASCII) are replaced by '?'.
[4] Displays of pasted string in Notepad (UNICODE) and Ultraedit (UNICODE) are DIFFERENT even though both are saved as UNICODE mode.


Questions

[1] Why CRs are ignored in VB TextBox control?
[2] Why texts shown in UNICODE mode in different softwares, e.g. Notepad and Ultraedit, are DIFFERENT?
[3] Please advise how to make the received string shown in TextBox control to be SIMILAR to that of Hyperterminal.
[4] What are the differences among ANSI, UNICODE and ASCII text?


I used the following code to display the received string to TextBox or txtReceive:
[VB]
Private Sub MSComm1_OnComm()

If (MSComm1.CommEvent = comEvReceive) Then
txtReceive.Text = txtReceive.Text + MSComm1.Input
End If

End Sub
[/VB]


Thank you very much!


TQvM

Copyright 2005-08 www.BigResource.com, All rights reserved