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 |
How would you use ActiveX Dll and ActiveX Exe in your application?
What are the Internet tools available in VB 6.0?
To.set the command button for ESC ___ Property has to be changed.
Write the Steps in Creating an ActiveX Control?
What is form in visual basic?
How can I call a 'hidden' DOS program from VB?
How will you retain the values of existing elements in a dynamic array when you want to alter the array size?
what is the Property used to add a menus at runtime?
Types of LockEdits in RDO.
What are the Differenct Types of Instancing Property in ActiveX Dll and Exe?
What is Collection Objects?
What are the new events in textbox that has been included in VB ?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)