• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1065
  • Last Modified:

Escape Key disable

Can I disable the Esc key funtionality in a Document.i.e., on press of Esc should not be functional
0
chikkon
Asked:
chikkon
1 Solution
 
snocrossCommented:
Are you basicly trying to stop users from exiting a document without saving it first?
0
 
ghassan99Commented:
Put this in the global-delaration part of the form:
Declare Function GetAsyncKeyState Lib "user32" (Byval vKey As Long) As Integer

And in the form's queryclose event put this:
If (GetAsyncKeyState(27)) Then
   continue=False
End If

This will disable the 'Esc' key.  But it will not stop the user from clicking the 'X' in the task bar (if you are using R5) or going to menu item file-close.

-Gus
0
 
ZvonkoSystems architectCommented:
chikkon,
No comment has been added lately (987 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to ghassan99 http:#6197902
Please leave any comments here within 4 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

Zvonko
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now