What does Query_unload event do in VB? Why we need Form
_unload event?

Answers were Sorted based on User's Feedback



What does Query_unload event do in VB? Why we need Form _unload event?..

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

What does Query_unload event do in VB? Why we need Form _unload event?..

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 does Query_unload event do in VB? Why we need Form _unload event?..

Answer / sr_arvind

to close the form .

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Visual Basic Interview Questions

What is the use of Connection object?

0 Answers  


Is it possible to set a shortcut key for label? Explain ?

1 Answers  


Is visualvm free?

0 Answers  


What is OLEDB?

0 Answers  


How do you make a TEXTBOX read only? Or, how do I prevent the user from changing the text in a TEXTBOX?

0 Answers  


which property of menu cannot be set at run time.

0 Answers  


It possible to call OLEDB?s Features directly in VB without using any control?

0 Answers  


Is visual basic still used?

0 Answers  


what are the different Types of Recordsets.

0 Answers  


i want to retrive data from one spead sheet to another UI (workbook). control will search cell by cell for each row and load the data in another workbook(UI).

0 Answers   Nissan, TechSoft,


List out controls which does not have events ?

1 Answers  


What is the use of NEW Keyword Explain?

2 Answers  


Categories