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 |
Explain the creation project schedule.
What is the use of Imagelist Controls ?
Difference between Recordset and Resultsets.
Types of cursors in DAO?
Which language is used in visual basic?
Is it possible to set a shortcut key for label? Explain ?
Write the Steps in Creating an ActiveX Control?
Why does everybody say I should save in TEXT not BINARY?
Does VB support pointers to functions?
What is the difference between <F8> and <Shift-F8> when debugging?
What are the Internet tools available in VB 6.0?
How would you access objects created in ActiveX Exe and ActiveX Dll
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)