Tools Links Login

Disable ALT+F4 in a Form

Disable the shortcut ALT+F4 in a Form

Original Author: Marcus Schmitt

Code

Private Sub Form_Load()
  Me.KeyPreview = True
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  If (Shift = vbAltMask) Then
    Select Case KeyCode
      Case vbKeyF4
      KeyCode = 0
    End Select
  End If
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 87 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.