Solved

Escape Key disable

Posted on 2001-06-15
4
1,021 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 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