Advertisement
3_2004-2005 Custom Controls/ Forms/ Menus #139877

Disable ALT+F4 in a Form

Disable the shortcut ALT+F4 in a Form

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
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
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine