Advertisement
4_2005-2006 Miscellaneous #152629

Overlord

I have seen alot of code disabling the "X" on the form to prevent uses closing the form, i.e. in the middle of data processing, this is a little "work around" i have been using...no magic..(o: or heavy API calls

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_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  If UnloadMode <> vbFormCode Then
    MsgBox "You gotta use the button"
    Cancel = 1
  Else
    Unload Form1
    Set Form1 = Nothing
  End If
End Sub
원본 댓글 (3)
Wayback Machine에서 복구됨