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




Ascii Value For Shift? (Resolved)


Please does anyone know the Ascii value of the Shift key?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Ascii For Shift
i have a 2 textboxes when a user presses tab it switches between them though when they goto the other textbox i want something to happen.

i already have this code (thanks to someone on here) but does anyone know what it would be for shift rather than enter:

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
'Other proccedures'
End if
End Sub

the above code works when i press enter in a text box does anyone know the ascii for shift

thanks alot

Robert

How To Pass Alt+Shift Keys [**NOT RESOLVED**]
How can I pass the {Alt}{Shift} keys from code to change the local language.
Code:Sendkeys "{Alt}{Shift}" is not working


regards

Haris

<Edit> breakfast3001 - Changed the "Shift" typo in the subject line </Edit>



Edited by - harisraz on 8/10/2005 4:52:53 AM

Weird Icon Color Shift On Toolbar (RESOLVED)
Hello everybody

I have this slight problem. My app has a main MDI form with a toolbar. Moreover, the toolbar has buttons (as every toolbar does... ) and the buttons have been covered with a small bitmap image. The original bitmaps have a white background. When I place these images on an ImageList control though, they appear to have a black background.
Does anyone know why the images exhibit this behaviour?

thx, in advance

George Papadopoulos

Hex To Ascii Or Ansi(Resolved)
I have browsed for an hour on this and have not found much. All the code snippets would work but right not Im not interested on calling a function. What I would like to do is simply type a two digit hex into a text box and get the ascii or ansi equivelent. Here is what I have so far. Oh, it does work until you introduce a letter from the alphabet, then it crashes.

VB Code:
Private Sub Command2_Click()Dim num As Longnum = Text1.TextText2.Text = Chr(Val(num))End Sub

Any help would be great

Which ASCII Extended? (Resolved)
I searched for the ASCII Extended Table and to my surprise I found two different tables...

In one of them it begins with "" and the other one begins with ""... I tried running in my VB the following code:


VB Code:
Dim i As Long  For i = 128 To 255  Debug.Print "Ascii(" & i & ") = " & Chr(i) Next i


And in 128 I got "", but is it safe to assume all computers will have Chr(128) = ""?

Ascii Values (Resolved)
Hi,

Is it possible to find the ascii values of each character typed into a textbox?

Thanx

NW

Ascii Codes? Resolved
Does anybody know How to Stop people inputting text in a text box and only letting numbers in?

Convert Ascii To Alpha***RESOLVED***
i have the following code

VB Code:
For X1 = 1 To 9            FoundPhoto = CheckForPhotos("D:DC290_0" & X1)                    If FoundPhoto = 1 Then Exit DoNext X1


which checks the first ten folders on the d drive.
What i want to do is check all the way up to the 'Z' drive in the same loop, but i don't know how to increment the alphanumeric value in the second loop.
I am thinking i can convert it to ascii, increment it and convert back but am unlclear on the process.

Psuedocode as follows

loop through drives a to z
loop through folders 1 to ten until photo found
end loop
end loop

thanks for any help you can give

Ascii Code Numbers? Resolved******
I have copied some data from a web page into an Excel spreadsheet. How ever there seems to be some hiden characters randomly inserted before or after the numbers. The numbers have decimals. I want to format the spreadsheet to remove characters that are not numbers or decimals. What is the ascii code of numbers and periods?

How To Get ASCII Characters Of String [Thanks For The Help RESOLVED]
Lately I've decided to make a program that will use databases & stuff like that, but I wan to encrypt all of my data. I will test to figure out the datatype, then I will encrypt it if it is numeric or encrypt a string by using its ASCII codes. I can figure out how to do everything, including decrypting it, I just need to know how to convert a string to its ASCII codes. Don't worry about the decrypting, finding out the datatype that is, I've got things in mind. Just please tell me what the function is to convert a string or even just a single character to its ASCII codes.
Thanks

Now, don't get me wrong, 'cause baseball's a great sport.
It teaches little children simple eye-hand coordination with little effort or exhaustion.

 -byufan

Edited by - byufan on 1/5/2005 5:01:58 PM

Convert Binary Value To ASCII (NEVER MIND, RESOLVED))
What is an easy way for that ?




Thank ya all!

RESOLVED: Read Database Dbf Field With Characters Between Ascii 128 And 255
I have a problem to read a field from a dbase dbf file. This field is a text field, but the data stored in this field is a hexadecimal value. To use this data I need to calculate the "asc" of this string. The characters below 128 are calculated correctly. For characters between 128 and 255 I calculate the wrong byte value.
When I monitor the dbf file with DBFView from Apycom I see the correct string only if I change the option DOS/WINDOWS to Windows. In visual basic I receive the string as represented in DOS.
Is there a possibility to extract the data from the database and receive the correct string in visual basic. I have tried to convert the character in visual basic but not with the right results.
Or is it possible to read the field binairy with ado.
Any suggestions??

Regards

Converting ASCII Back Into Characters...[Resolved By Manavo11]
is there any simple way to do this? Basically the goal is to lock out certain keys on the keyboard by ascii value so the person doesn't input numbers where only letters go and vice versa.

RESOLVED - Checking ASCII Values In A Textbox Array
I am trying to make sure that only numbers, or the " . " is entered into an array of textboxes. I have code for one text box which works. I have tried to adapt it to use with an array, but it's not working properly

VB Code:
Private Sub txt0_KeyPress(Index As Integer, KeyAscii As Integer)'...check to see if character is a number onlyDim ASCIIcode As IntegerDim strTemp As String    strTemp = Right(txt0(Index), 1)If strTemp = "" Then Exit SubASCIIcode = Asc(strTemp)Select Case ASCIIcode Case Is < 48     If ASCIIcode = 46 Then     '...If character is full stop let it pass     Else         txt0(Index).Text = Left(txt0(Index), Len(txt0(Index).Text) - 1)         txt0(Index).SelStart = Len(txt0(Index).Text)         MsgBox "Numbers only please.", vbExclamation + vbOKOnly, "Incorrect entry"     End If Case Is > 57         txt0(Index).Text = Left(txt0(Index), Len(txt0(Index).Text) - 1)         txt0(Index).SelStart = Len(txt0(Index).Text)         MsgBox "Numbers only please.", vbExclamation + vbOKOnly, "Incorrect entry" End SelectEnd Sub

It is not always geting rid of the correct character.

Thanks.

Ascii Code Backspace Does Not Work For My Application Help Please!!!!!!!!! *RESOLVED*
Private Sub btnok_Click()
    If txtage.Text = "" Then
        MsgBox "You must enter age."
        Exit Sub
    End If
    
    If txtfirstname.Text = "" Then
        MsgBox "Enter your Name."
        Exit Sub
    End If
    
    MsgBox "Input Accepted"
End Sub


Private Sub txtage_KeyPress(KeyAscii As Integer)
    If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then KeyAscii = 0
    Exit Sub
    If KeyAscii = 8 Then KeyAscii = 8
  
End Sub

Private Sub txtfirstname_KeyPress(KeyAscii As Integer)
    If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then KeyAscii = 0
End Sub



 

Edited by - i3fan8760 on 6/12/2005 9:18:49 PM

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

Shift Tab
How do I create the functionality of shift-tab inbetween text boxes? I know I have to use the Keypress events, but I can't figure out how to do it with shift.

Shift + Tab
Can anyone tell me why this does not work when i press
Shift and tab keys


Code:
Private Sub cbo1_1_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 1 And KeyCode = vbKeyTab Then
SetOldQuestion stOldQ
End If
End Sub
Instead of running what is in the keydown sub it moves onto the lostfocus event which does something else.
I have the keypreview event set to true.
The shift does come in as 1, but the keycode comes in as 16 not 9 as which is the vbkeytab integer.

Any help would be great.

Ian.

Shift And Tab
I have 5 rows of 5 controls. I have the TabIndex set correctly but when I use Shift and Tab the cursor won't go up one row.

I have code in the KeyUp event. When the user hits enter in one of the controls the program does something. Here is the code which shouldn't effect when the user hits Shift and Tab.


Code:
If KeyCode = vbKeyReturn Then
If Trim(cmbLIModelNo(Index).Text) <> "" Then
'Set this flag to true so the click event will be processed.
fgKeyReturn = True
Call cmbLIModelNo_Click(Index)
End If
End If
Any suggestions on why the Shift Tab won't tab through the fields in reverse order?

Shift Key
hi..

i want to know if a user has enterd a character
by pressing the shif key ... i mean SHIFT + a = A
i hope u got it...
i used the GetAsyncKeyState api...... but itz not
working all the time......

please help................

Do I Need To Shift To VB?
I've been using Access for 4 yrs and I feel insecure with
VB6 program, so I tried to make a program to replace with my
MSAccess System for my eBilling System. When I tried to
retrieve data from SQL Server I found out that it is very slow.
Im using the ADO Connection first, it is slow then I changed to DataConnection using ODBC driver still slow, MSAccess is still faster to get data. WHY LOTS OF PEOPLE OVER THE INTERNET WROTE ME THAT VB6 IS VERY FAST? Anything wrong? PLS HELP.

THANKS IN ADVANCE! ! !

Bit Shift C =&gt; VB
Hi all,

is it possible in VB to do something like in C :

k >>= 1;
i2 = nn >> 1;

please reply...

Shift Key Down
I need to be able to tell if the user has the shift key down when clicking on a grid line as click no shift will be select and click +shift key will un-select but not sure how I tell if shift is down whilst in the click event.

Del + Shift Key
how do you press the "Shift+Delete" Key from your app.

Shift Key
How do i make somthing happen when i hit shift ctrl and r at the same time... i know its like KeyPress or somthing but i dont understand it im a NEWBIE and my VB's MSND isnt working..

Alt+shift
Hello,
As you know with some Windows Systems that support more than one language you can change between languages by pressing ALT+SHIFT.

How can I do this by VB?

Thanks

Shift/Tab
Does anyone know how to make a Shift/Tab key operation
So that the cursor and or focus moves backwards
In a text box and backwards to the previous control
On a form?

Thanks in advance
CAS21

Shift Bit Right
Whats the VB6 equivalence to >> (Right bitshift) in C#?

I need to do >> 1 and >> 8 (Bitshif 1 step ti the right and 8 steps to the right)

How Can Shift A Hex Value In VB.
Dear all,


I have a Hex value. I want to shift the Hex value to left 4 position. How I can do it? .. Is any function avialable ?

Regards,
Kareem.

Alt+shift
I want to press the alt hold it and then press the shift ... can i do that (hold to bottons pressed (in the vb code)?

Shift
how can i tell wether or not the shift key, or any other key is being held down. And thus, when it is let go, somethign will happen.

thanx

Pressing Alt+Shift+D
hi, how to show a form when i press Alt+Shift+D in an MDI form?

Is There A Way To Trap The TAB And Shift-TAB?
Before it goes into the "LostFocus" of an object? Apparently, VB executes LostFocus before it executes KeyDown or KeyAscii. I'm trying to send the focus to another object other than the next textbox by using the Tab and Shift-Tab keys.

Thanks

Detecting Shift+A
I need to toggle my application between certain modes without having focus on it, therefore i need to capture all keys and everything and always check if it is A. I can do that using keystate, i think, but then how do i detect if Shift is pressed with it also?

thanks

Shift Array Up
is it possible in an array to shift all the values after a certain point up to th one above. my problem is that i'm deleting something from inside array(400) and it may be in the middle of the array at array(200), but now i have a gap in the values so next time i go searching for the first empty space in the array it finds the middle and not the end.

Codes For INS Key And SHIFT Key
I'm trying to write a program that will do various functions when the shift key is pressed, the insert key is pressed, or when the combination of the shift and the insert keys are pressed.

Does anyone know the codes for these keys (key combinations)?

I thank you for your time.

Left Shift
i generally am not to good with complicated math algorithyms so im hoping someone here can help out. basically what i want to do is get rid of a loop in my code. What it involves is a type of exponential math.

I can achieve the desired result in Calculator (in scientific view) by doing the following:
Press 5 - Press Lsh - Press 5 = 160

so the formula is: Value [Lsh] Amount = Result

i can also accomplish it in a loop (wich is what im trying to eliminate)

Dim Amount as Integer, X as Integer, Result As Long
Result = 5
Amount = 5
For X = 1 to Amount
Result = Result + Result
Next X

Msgbox Result 'shows 160

my question is, is there any built in vb functions i can use or a math algorithym that i can achieve the desired result in one simple line of code, ive tried messing with exp(), ^, Sqr() etc.. and nothing works out...

Shift Right That Byte...
In C++ there's a very fast and convenient way to "shift" bits right or left of a given number of bits, the << and >> operators... for example:

0xFF00>>8 should return 0xFF

What's the best way to do this in VB? (uhmmm, I mean, best=fastest )

Thank You.

There Are 2 Shift Keys
hi ive just got the hang of key press and key down functions by using the select case method, trouble is when it comes to the shift keys, there are 2 of them but just one piece of code for both "vbkeyshift". how can i determine which one has been pressed. i have seen it done i a pinball game but i dont know whether or not that was made in vb. also is there keycodes for the extra keys that you get on a laptop keyboard like the "FN" key.

it is quite important that i find out how to do the shift keys, and possibly the same with the "ALT" and "CTRL" keys as they might be handy in the future.

any help would be super!

Are You Holding Shift?
how can I detect if the user is holding one of the modifier keys (ctrl,shift,alt) and another key at the same time

Get Shift State
Is there a way or maybe an API call that will return whether the shift key is being held down? I need to do this without using an object event(like a textbox), meaning the form would not be in focus.

Thanks!

MsflexGrid Shift Row Down
Hi

I saw before code to swap or shift row down i think it is for Flyguy but i lost it and i do search but i can get it

I want when i click first Row it will go to end and the second Row will come as first row

I have FixedCols i don't want to swap

Shift Left In VB6
Hi,

I need to make a shift-left instruction on the hex-value : 19068039A9,

How can I do this in VB. Is there a simple instruction or combination of instructions ?

Using CTRL + SHIFT + F1
Hello

I can use CTRL + F1 bys using the following code

Code:
Form_Keydown()
if keycode = vbkeyF1 and Shift = 2 then
'code
endif


How can i use CTRL + SHIFT + F1 ?

Farooq

Code For Shift Alt M
is there a code for shift+Alt+M? What i mean by this is a code that something hapeens when Shift+Alt+M is pressed.

Shift +F11 Help Needed
hi

I am Visual Basic 6.0 User.
Actually i need to know Keypress Event

In a run time if i press Shift+F11 then i want set the Flag to 1.
If i press Shift+F11 again i want to set the flag to 0

So how can i acheive this

Depending on the Flag i can continue my work easily..


Waiting for reply
Thank you

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