by SephirothBCH (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 8th April 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Prevent your app from being unloaded or terminated with this code.
' instance of Form1 is created, thus preventing the app from being terminated.
' Of course, you will have to restore any information that will be lost in the
' unload function. Also, sometimes Unload invokes Terminate, so make sure that
' only one of those procedures contains code.
Private Sub Form_Unload(Cancel As Integer)
Dim a As New Form1
a.Width = Me.Width
a.Height = Me.Height
a.Left = Me.Left
a.Top = Me.Top
Me.Hide
a.Show
End Sub
No comments have been posted about Prevent your app from being unloaded or terminated with this code.. Why not be the first to post a comment about Prevent your app from being unloaded or terminated with this code..