...

View Full Version : VB: Holding The Shift Key.



Morgoth
10-31-2002, 06:41 PM
Now, all I need to know is the correct KeyCode for the shift key so I can put it in the if statements.


Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = vbKeyShift Then
BlnHoldShift = True
End If
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If Shift = vbKeyShift Then
BlnHoldShift = False
End If
End Sub

Morgoth
11-01-2002, 03:50 PM
My Bad

I got it fixed

My Text box was highlighted so I changed Form_etc... to TextBox_ert...

and

I changed shift = vbshiftkey to shift = 1

Though I did have to use shift = 0 for key up


I am done now.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum