|
-
Jun 26th, 2000, 09:41 PM
#1
Thread Starter
_______
I was given this but it doesn't work...????
Set KeyPreview = true
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If (KeyCode = 27) Then Unload Me
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 26th, 2000, 09:45 PM
#2
Fanatic Member
Try.
1. Setting the KeyPreview property at deisng time.
2.
Code:
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
The other bit looks ok.
Iain, thats with an i by the way!
-
Jun 26th, 2000, 09:47 PM
#3
Fanatic Member
Try this
Code:
Private Sub Form_Keydown(KeyAscii As Integer, shift As Integer)
Dim ShiftDown As Boolean
Dim AltDown As Boolean
Dim CtrlDown As Boolean
ShiftDown = (shift And vbShiftMask) > 0
AltDown = (shift And vbAltMask) > 0
CtrlDown = (shift And vbCtrlMask) > 0
Select Case KeyAscii
Case vbKeyReturn
Call cmd1_Click
Exit Sub
Case vbKeyEscape
Unload Me
End Select
End Sub
-
Jun 26th, 2000, 09:50 PM
#4
Thread Starter
_______
actually...
dumb dumb here...I set the property but what I
forgot was I am playing a wav file while the nag
does it's nagging...I need to kill the wav because
it plays till it is finished...
Call sndPlaySound(ByVal App.Path & "\sitting.wav", SND_SYNC)
Timer1.Enabled = False
Unload Me
Load frmPicDisplay
frmPicDisplay.Show
...would you know how to abort if esc is pressed?
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 26th, 2000, 11:51 PM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|