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




Command For Ascii Value


if i dimension x as string, and x= "a", how can I output to a label the ascii value for x?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
ASCII Command
hello...

just wondering if you are able to find out what key you pressed on the windows media center remote control..?

also how do you write a code if a key is pressed making it display a messagebox with the key you pressed..

Eg. if i press the 'Left' arrow key making it say 'you presses: Left arrow key'

any ideas.. vbkeyLeft don't work when i use that as the ascii key is there any others?

Thanks.

Ascii Check In Textbox With Command Button
hi,

Can anyone please tell me why this little bit of coding cant work for me. Seems stupid but im a beginner with VB.

Option Explicit

Private sub command1_click()
dim ascii as textbox
set ascii = Text1

If text1 = ascii (66 or 98) then
MsgBox "good"
end If
End sub

Thanks loads friends.

Sending ASCII Command To Printer Issue *** Thank
Have someone used to send ASCII command in order to control printer from VB?

I'm trying to create a barcode printing program ,that support ASCII command.

For example, I would send below ASCII to print a barcode

B0,0,10,N,"23240015MI03435"

but I've no idea.

Thank in advance..

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

Detecting If Ascii Keys Are Pressed, Eg Ascii(31)
I need to be able to detect if someone presses a key like "1" by using ascii keys

so like detect if ascii(31) is pressed

i need this for 2morrow so help!

~

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

Data Conversion: EBCDIC->ASCII , ASCII->EBCDIC
Is there command to convert an EBCDIC string to ASCII and the other way around?

Tom Cannaerts
slisse@planetinternet.be

The best way to escape a problem, is to solve it.

How To Convert Ascii Codes To Letters, And How To Uncode Letters To Ascii Codes?
how to convert ascii codes to letters, and how to uncode letters to ascii codes?
eg 65=a
a=65

Project Properties, Make/Command Line Args Vs Command
When setting the Project's Properties, on the Make tab, in the Command Line Args area, if I put a file's PathName and run it, there are no quotes Chr(34) around it. When I run the app from the IDE it works and copies/moves my file. When I pass a file's PathName via drag/drop, command line or Send To menu, I get quotes and the copy/move fails.

I've parsed the Chr(34)'s out of the strings, but am curious if this will affect other OS's in different ways? I'm developing it on XP, and will be running it on an ME and a 98SE machine as well.

Any thoughts?

TYIA

'Rekd

Make All Command Boxes Have A Change Command
I need some help trying to figure out how to make all my comboboxes have a Change command without having all the boxes in an array.

Is this possible?

Thanks,
David

Parend Command & Child Command (DataEnvironment)
How can i have reference to a child Comand in my code???
fror example to ... .Movelast or to .Delete

Plz Help

Changing The Command Text Of A Command That Has Been Grouped
Hi, I am a newbie to all of this and was wondering if someone could help me with a problem I am having. I am trying to dynamically change the command text for a data environment command that has been grouped. For some reason what I have tried does not work. Here is what I have tried:

I have a data environment with a command called command1 that is grouped. The grouped name is command1_grouped. The grouped command has the following fields: Summary fields has MealName. Detail Fields has MealName and IngrediantName.

I have created a data report that is grouped by the meal name and then lists the ingrediants for that meal. This works fine. However, I would like the user to be able to imput a list of meals and then get a print out. This requires me to build the command text dynamically. But when I try the following I get errors.

DataEnvironment1.Commands("Command1_Grouping").CommandText = (NEW SQL STATEMENT GOES HERE).

DataEnvironment1.Connection1.Execute DataEnvironment1.Commands("Command1_Grouping").CommandText


When I run this I get an error telling me that Command1.IngrediantName cannot be found(this occurs when I try to open the data report). If I ungroup the command and then change the command name back to its original name it works fine, except I can no longer use the group heading in my data report. I.E. DataEnvironment1.Commands("Command1").CommandText = (NEW SQL STATEMENT GOES HERE).

It wont let me use the original command name if it is grouped. In other words if I tried the code above while the command was still grouped I get an invalid procedure or argument error.

As you can probably tell I am at a complete loss here and would really appreciate anyones help

Thanks,
scarlet13

Using A Command Button To Click Other Command Buttons? Please Help
Hi
I am creating a program and I want to make it so if I click one command button VB automatically click other command buttons

i.e.
Clicking command 4 runs
command 1
command 2
command 3
in that order

Please help

Thanks

Running A DOS Command WITHOUT The Command Window Appearing
Hi,

I want to run a DOS command from my Visual Basic program - and I can do that fine, but I want to do it without the Command Window popping up. Is there a way to do this?? because if the command window pops up it makes my app look very scruffy.

Robin

Shell Command, Command Line Parameter
hi,
i'm a VB newbie...

I'm attempting to make a file/folder selector to play winamp compatible files in (its my Software Design Major ) - the trouble is with the command line interpretation of the code. For those who don't know, items can be played in winamp like so:

C:path owinampwinamp.exe /ADD C:mp3whatever.mp3
(Adds C:mp3whatever.mp3 to the playlist of a running Winamp, if Winamp is running, otherwise it opens Winamp and plays it outright)

this also works with a folder specified at the end of the winamp location aswell rather than a file

heres what i'm trying
this is onclick


VB Code:
fileselected = filemodelist.SelectedText1.Text = fileselectedopendir = "C:Program FilesWinampWinamp.exe " + fileselected + "" Text1.Text = opendirShell opendir


this just opens winamp with a messed up playlist where every part of the location with a space between it is a new item in the playlist

e.g.
1. Alice
2. Deejay
3. -
4. Who
5. Needs
6. Guitars
7.

there must be a relatively easy way to do this...

WuZ.

Sending Command To Command Prompt To Be Execute
how can i send a dos command from vb program to command prompt to be execute? thanx

Using Command Line Arguments In Shell Command
i need to run a program with a command line argument but i havent figured out a way and i really tried to search here,can someone point
how to use it with shell argument?

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 -&gt; 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
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.

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?

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