Solved

Escape Key disable

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now