Overlord
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
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
Original Author: Flemming Sudsgaard
Code
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
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.