VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Overlord

by Flemming Sudsgaard (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

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

Rate Overlord

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

Download this snippet    Add to My Saved Code

Overlord Comments

No comments have been posted about Overlord. Why not be the first to post a comment about Overlord.

Post your comment

Subject:
Message:
0/1000 characters