Solved

Escape Key disable

Posted on 2001-06-15
4
1,025 Views
Last Modified: 2013-12-18
Can I disable the Esc key funtionality in a Document.i.e., on press of Esc should not be functional
0
Comment
Question by:chikkon
4 Comments
 
LVL 5

Expert Comment

by:snocross
ID: 6196469
Are you basicly trying to stop users from exiting a document without saving it first?
0
 
LVL 6

Accepted Solution

by:
ghassan99 earned 100 total points
ID: 6197902
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
 
LVL 63

Expert Comment

by:Zvonko
ID: 10476216
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question