Ascii
Hello i am making a program that takes a sentence and then encodes it to ASCII.
For intI = 1 To intCharacters strLetters = Mid(strWord, intI, 1) dblAscII = Asc(strLetters) Next intI lblAnswer.Caption = dblAscII
This wont display the ASCII Codes. What am I doing wrong???
Thank you.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Extended Ascii/unicode String Conversion To Stanard Ascii
I encountered problems when sending certain characters from Windows VB to IBM Mainframe Cobol/DB2 such as
‘(left single quote) or ’(right single quote). All the characters after the extended ascii got cut off. I don't have problems when sending '(single quote).
Is there any vb functions to convert it? Or maybe changing the
XEOLEDB mapping below would fix it (sample code below)?
{L"DESCRIPTION4", NULL, 68,STANDARD_COL_FLAG, 56, DBTYPE_BSTR, 0,0,0},
I am not familiar with IBM Mainframe and the service connecting VB to it. My only solution right now is to use the replace function but I am afraid there will be a performance problem.
thanks
clark
Convert Ascii Constant To Ascii Value With Program
How would I go about doin the following? If a string contains "vbKeyF1", how would i get vbKeyF1's ASCII value equivalent (ie: 112) to be written in another string?
Edited by - Marce22 on 10/10/2003 7:04:38 PM
BCD To ASCII
Is there some class or code to convert BCD numbers to ASCII (and viceversa) in VB6? I get BCD numbers to buffer and I need to show ASCII (decimal) numbers.
Can somebody to help me, please?
Key Ascii
what is the keyAscii for the arrow keys?
Help With Ascii Please
OK..i juss need to know if there is some of letting the program know that you are useing the arrow keys...I'm hoping there is an ascii code for it...but i cant find.
If there is ascii codes for the arrows can someon e please let me know what they are.
If there isnt any ascii codes for the arrows..Is there any way to tell ym program that the arrows are pressed?
I hope this makes some kind of sense.
Ascii
HI...
i want to send keys but using ascii code
is there a way to do that
ex: instead of sendkeys "2"
command "ascii for 2"
thnx in advice
Hex To Ascii And Ascii To Hex?
Sup ppl, im trying to convert:
"hello!" to "68656C6C6F21" (thats hello! in HEX) and
"68656C6C6F21" to "hello!"
How do i do it?
ASCII Art And VB6
Can anyone tell me where I can view an example of a VB6 program that uses loops to print a triangle or letters, kind of like ASCII art.
Key Ascii
Im gonna start trying to make a game like either pac man or a game like that where when you press left, the figure moves left....I sorta understand the keyascii and I have a list of all the key's value. What I want is when the user presses w the figure moves forward, a it moves left, d it moves right, and s it moves back....I couldnt figure a way to make it go..I can get it to move by pressing any key but how would I specify what key makes it move where...I tryed my best to explain what I want
heres waht I use to make it move
image1.left = image1.left + 100
I use that basic statement to make it move to the left....if anyone can help me please respond asap...thanks
Ascii Art
i'm working on some ascii art but i can't seem to figure this part. i have button and on click i want my form to look like this but have the b's aligned on the right instead of the left...
bbbbbbbbbb
bbbbbbbbb
bbbbbbbb
bbbbbbb
...etc all the way down to one "b"
but it looks kind of like that except all the letters are aligned on the left when the they should be aligned on the right. it seems like in my code it's ignoring my spacing code. here's my code
For y = 10 To 1 Step -1
For x = 1 To y
Print "b";
Next x
Print
For z = y - 1 To x
Print "";
Next z
Next y
Ascii Art
how can i make it so that when a user enters in a number into a textbox it will display that number as that many but as a character such as "b"
so if user enters = 5
lbldisplay will show up bbbbb
Ascii And Other
in a text box, i have set it to do multiple lines, the thing is, how you you get a coding to go onto the next line (press enter? with the enters ascii code?) If that is the case does any one know how to make the coding use the ascii to make it go down to the next line.
eg.. I wright here, then i do something,
After that somthing is done i want it to write on the next line here.
and so on, so that each time i press that somthing *press*
it goes on to the next line., (no its not the manual enter press its a log im making, and it has to be automated)
So if you can help then i need it
Hex To ASCII
Any One know how to convert HEX to ASCII like a hex editor does?
The HEX equivalent is not the Chr(#)
UTF-8 To ASCII
The following code converts an ASCII character to UTF-8 format:
Code:
Private Function ASCIItoUTF(d As String) As String
Dim c As Long
c = Asc(d)
If (c < &H80) Then
ASCIItoUTF = Chr(c)
ElseIf (c < &H800) Then
ASCIItoUTF = Chr(&HC0 Or (c / (2 ^ 6)))
ASCIItoUTF = ASCIItoUTF + Chr(&H80 Or (c And &H3F))
End If
End Function
Maybe this I'm just not thinking clearly here, but is there a way to convert a UTF-8 formatted string to ASCII by reversing this code? Sorry, I just can't quite get (sleep deprivation)
Ascii
Does any one know what the ASCII numbers are for the up and down arrow keys?
The Charts in MSDN does not show them.
Thanks
Uri -> Ascii && Irc
Heya All,
Was wondering if there was a built in function to convert URI (%20 == " " <space>) formatting into standard ASCII. I am using the MSXML parser, which should convert that automatically seeing the XML specs require use of unicoding data values.
Also, do you guys have an IRC channel? If ($_), what server?
Thanks!
Cheers-
NewWave
ASCII
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = KeyAscii = 111 Then
If KeyAscii = KeyAscii = 100 Then
MsgBox "Secret Area loading. . ."
End If
End If
End Sub
That doesnt work....how can I make 2 characters open a Error message?
Ascii && Cmd Btn
Hey guys, 2 Qs.
1st, is there a way to set on a form so that no matter what is highlighted (where the focus is), and you hit the escape key, it gives a msgbox saying you hit the escape key. The same with the enter key. On a form with 2 cmd btns, I can use the keypress event on one and it works if I press escape, but not if I press enter. On the second, I am just calling the event of the first. But it seems like there has to be a better way of doing even that, much less the fact that it only half works. I mean, if I have a form with 20 objects, I do not want to make a keypress event for every object in case that object is highlighted.
Here is what I have so far:
Private Sub Command1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 27
Form2.Visible = True
Form1.Visible = False
End Select
End Sub
Private Sub Command2_KeyPress(KeyAscii As Integer)
Call Command1_KeyPress(KeyAscii)
End Sub
2. On a command button, a lot of vb books that I have say that I can change the forecolor to the command button, but I cant seem to make that happen. If I change the backcolor of my command button to say black, I want to be able to change the text to white. Is this possible? Sure seems like it would be.
Thanks,
Sort
ASCII
On frmMain I have only a label..i need to put code into the keypress sub of the form that makes lblASCII tell me what the ascii number of the button I just pressed..
the lblASCII.caption should look like this "a=97" etc..howwould i do this?
Ascii
Hello.
I'm sure this has probably been addressed somewhere else, but a quick search did not return what I was looking for.
How can I bump up or down every character in a string by a certain amount of ASCII numbers?
Key Ascii
Any one know the # for key ascii for ENTER?
Ascii
i need to make sure that information that is plugged into a textbox are consist only of alphabetic letters. else an error occurs.
i think i may be using the ascii value wrong
please help!
Ascii Chr
any one know the chr() version of the paragraph charcater?
(the big thick line)
http://www.clansr.co.uk/cs/files/untitled4000.jpg
Key Ascii
How do I make a little program that shows up the ascii code of the key that your pressing?
Hex And Ascii
Allright i need to Convert some hex to Ascii, and back to a variable. what kind of variable should i use? and how do i convert the hex to ASCII? any help would be apreciated
Ascii
Hey there,
Can anyone pls tell me how to get a text box to only allow numbers?
I can get it to allow just numbers by:
Private Sub txtPhone_KeyPress(KeyAscii As Integer)
If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
KeyAscii = 0 ' Cancel the character.
Beep ' Sound error signal.
End If
But it wont allow backspace...
Also does anyone have any tips on how to make a project more snazzy? Like graphics and stuff?
Thanks
Billy
Ascii
is there any ascii list type deal for visual basic and instructions on how i can make a button have its caption = to it.
like i have cyrillic letters i want on my buttons so i can make like a keyboard. and how i would do that and if you dont know cyrillic is russian writeing
Ascii
When using this..
Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
... how do I use the arrow keys? What is the ASCII for the arrow keys, is what I need to know
Thanks
Ascii???
i have a vb program that i need help in
the user is to enter in a password and i want to make sure that it is aplanumerical how would i go about soing this? could i use the ascii to do this? if i can how would i ?
Ascii
hey all
anybody know the ascii number for the back arrow key?
thks
Ascii
Hi guys
i have a dat file type DB that has been compiled by a program but of my own data. i have lost the data and am left only with the .dat file. i am trying to salvage as much of the info contained as possible so that i may add it to my new project.
MS SQL db
obviously i want to try to split the info into records but having opened it in notpad there are some patterens but not sure how requlare they are.
i have noticed the they are what i understand to be combinations of ascii.
examples as follows.
Code:
]y@rßã@
âdÒÛã@
3333s0ã@
3333s0ã@
3333s0ã@
âdÒÛã@3333s0ã@
âdÒÛã@3333s0ã@ g
these are combined with some that dont show up when i pasted them these i can only discribe as empty box type characters.
my question in the first instance is in order to try splitting the data by the usual method of specifying a limiter should if be some thing like this
Code:
Str = Split(tempStr, "âdÒÛã@3333s0ã@")
if so how do i specify the box shapes? "Box shapes" i know that sounds a dumb descriptin but i have no idea what they are - spaces maybe?
Ascii 255
A chr(255) on my comp gives me a ÿ whereas on other systems it seems to give a black space does anybody know anything about this ?
I need to produce the blank space...
Is This ASCII?
I used a packer sniffer for a webpage and i found this in the data:
DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+XHTML+1.0+Strict%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtm l1-strict.dtd%22%3E%0D%0A%0D%0A%0D%0A%0D%0A%3Chtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22 +xml%3Alang%3D%22en%22+lang%3D%22en%22%3E%0D%0A%0D%0A%3Chead%3E%0D%0A%0D%0A++%3Ctitle%3E%3C%
is that ASCII? if it is, is there a function that will convert that into regular text?
Ascii
Guyz how can I get all the characters (not in the keyboard) in a string and
display it in another txtbox?
txtbox1 = "™ÈñõŒ the dog ←ÖÜç"
string1 = txtbox2
txtbox2 = "™ÈñõŒ ←ÖÜç
make it simple plss.
Thanks....
Key Ascii
how would i get my program to call a procedure when then enter button is pressed?
Ascii
i am making a form that there is a txt box and when you type a word in it and click a cmd button in a label it shows what each letter you typed in equals in ascii code.
in vb is there a certian code for ascii or will i have to type what each letter equals manually. thx
Should I Use Ascii?
Hello, in my app using winsock once data is sent to the server app the data becmes the tag for that winsock in the array that sent it, and i want to use symbols such as ( ) : - but it wont let me put them into a tag, should I use ascii? or is there no way of doing this
VB6 And ASCII
Hi, I hope you guys can help me out. I'm making a game where you move an object with the letters i, j, k, and l. But I'm having trouble. I'm doing this for a project but I'm just basically copying one we've done in class, just with different graphics etc (Yes! I'm allowed to do that!)
This is what the other form has, not mine. It doesn't seem to want to work when I put it in my code. I change the names and all that crap... but I don't know what's wrong.
Private Sub Form_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 73, 105 ' the 8 key
imgAnt.Top = imgAnt.Top - 300
Call eatsugar
Case 77, 107 ' the 5 key
imgAnt.Top = imgAnt.Top + 300
'Call eatsugar
Case 74, 106 ' the 4 key
imgAnt.Left = imgAnt.Left - 300
'Call eatsugar
Case 75, 108 ' the 6 key
imgAnt.Left = imgAnt.Left + 300
'Call eatsugar
End Select
KeyAscii = 0 ' the keystroke won't go to another control
End Sub
--Starbuck
Help With ASCII
Help, I can't understand why this bit of code isn't working. I have it in quite a few subs, and it's doing the same in each. It's acting as if the if statement is always true, even when I put in letters. I'm quite confused here. Am I doing something stupid?
VB Code:
Private Sub txtCustomerTitle_Validate(Cancel As Boolean) If keyascii > 90 Or keyascii < 65 Then MsgBox "Please enter a valid customer title." txtCustomerTitle = "" txtCustomerTitle.SetFocusEnd If End Sub
I've declared the keyascii as a global variable in a module, as I will be using it on many forms.
ASCII > HEX
I have a string.
"hello!"
How to convert each letter to hex??
VB Code:
Public Function GetChar(whatString As String, charLocation As Long) As StringDim strTemp2 As StringstrTemp2 = Right(Replace(whatString, Right(whatString, Len(whatString) - charLocation), vbNullString), 1)GetChar = strTemp2End Function
Then later on...
VB Code:
dim strbuffer as stringFor a = 1 to len(mystring)'now i have letter, how to put it in strBuffer as HEX VALUE?next a
Thanks
Using ASCII
I have an image on the screen I want to move left and right by using Z and X.
I know the numbers are 122 and 120 respectively.
I got as far as this, but it could be waaay out! any ideas? Thanks
Private Sub TmrBase_Timer()
If ASCII122 Then ImgBase.Left = ImgBase.Top - 50
If ASCII120 Then ImgBase.Left = ImgBase.Top + 50
End Sub
Hex... Ascii...
how can i read data in a file and display the hex value? then convert it to ascii?
Chr --> Ascii --> Chr
ok i have this::
VB Code:
Private Sub cmdCode_Click() Dim strCode As String, strLetter As String Dim strFinalCode As String, strClean As String Dim intColon As Integer, intcounter As Integer Dim intShift As Integer strCode = txtCode strCode = UCase(strCode) strCode = strCode & ":" intColon = InStr(1, strCode, ":") intShift = InputBox("enter the shift number") Do Until intcounter = intColon - 1 strClean = strLetter intcounter = intcounter + 1 strLetter = Mid(strCode, intcounter, 1) strLetter = Asc(strLetter) + intShift If strLetter > 90 Then strLetter = strLetter - 28 + intShift Else strLetter = strLetter End If strLetter = Chr(strLetter) strFinalCode = strClean & strLetter txtCode.Text = strFinalCode Loop End Sub
when i set intShift to 2... the letters go to AB whch is what tey are suposed to do... but whe intShift is 3 they go to CD... not BC... (same with 4... goes to EF and not CD) can some1 give me a hand here plz? (and i don't mean applauding either :P)
Key Ascii
Why doesnt this code work?
VB Code:
Private Sub Form_KeyPress(KeyAscii As Integer)If KeyAscii = vbKeyControl & vbKeyZ ThenData1.Recordset.MoveLastData1.Recordset.DeleteEnd IfEnd Sub
Ascii To Hex And Then Hex To Ascii
ive found a way to pass an ascii string through a filter to convert it to hex, except i havent figured out how to do the actual conversion, and then the reversion... any help will be GREATLY apreciated
ASCII To SQL?
I need to use vb with SQL but my data is not yet in SQL.
Does anyone know the best way for me to take some data currently in ascii format and put it into SQL?
Thanks
|