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

How can you Add API functions to your Application?

0 Answers  


How would you define and use a Boolean in VB?

2 Answers   Asteroid Software Services, Microsoft,


Is it possible to change menu runtime using API? If yes? Specify the function names.

0 Answers  


List out the ADO objects?

2 Answers  


Why API functions are Required?

0 Answers   L&T, Wipro,






Is it possible to change menu runtime using API? If yes Specify the function names?

0 Answers  


What is the use of Tabledef?

0 Answers  


How does a DCOM component know where to instantiate itself?

1 Answers   Synechron,


What is "NULL"?

0 Answers  


what is the Difference between Dynaset and Snapshot?

0 Answers  


what are the Types of Modal windows in VB?

1 Answers  


DHTML Is used for what?

0 Answers  


Categories