What does Query_unload event do in VB? Why we need Form
_unload event?
Answers were Sorted based on User's Feedback
Answer / amirthraj
Query_Unload event is fired, when the form is actually
preparing for unload. Whereas Form_Unload is triggered when
form is unloaded. It's possible to stop the form unload
from Query_Unload event by setting its Cancel argument to
True.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / parmanand
Query unload means your form is about to close but still not
closed.
Form _unload means your form is released from the memory and
its totally closed. Hence if you want to display any message
you will keep it in Query unload , form unload will not work.
Ex.
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode
As Integer)
MsgBox "do you want to close the form ?", vbYesNo
if vbno then
Cancel = True
end if
End Sub
Is This Answer Correct ? | 2 Yes | 0 No |
What is the use of Immediate, Local Window?
How do I program the Novell NetWare API from VB?
Write the steps in Creating ActiveX Dll and Active Exe?
Is a foo VBX/DLL available as shareware/freeware?
What is the difference between queryunload and unload in form?
What is the difference Between ADO and other data access objects?
which property is used to change to some value to access a identity column in datacontrols?
What are the Sequence of events when a form is loaded in Visual Basic?
What are the types of Error? In which areas the Error occurs?
Explain the working of templates?
What is keyword used to compare two objects?
What is the maximum size of form to hold the controls?