Delete key

  • Thread starter Thread starter David French
  • Start date Start date
D

David French

Is there any way the Delete key on the keyboard can be deactivated?
I know the icon "Delete" may be removed and even the entire Toolbar may be
made not available...but the Delete key on the keyboard is always there.

Any suggestions would be appreciated.

Dave French
 
What are you trying to achieve, Dave?

While it is possible to set a form's KeyPreview property to Yes, and then
trap the Delete key in the form's KeyDown event and destroy it by setting
KeyCode to zero, there is probably a better solution.

For example, if you are trying to prevent the user deleting a record, you
could just cancel the form's Delete event. Easier still, just set the form's
Allow Deletions property to No.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top