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

CONNECTIVITY OF SQL 2000 + VB USING ODBC. steps i Follow- 1) Go to Control panel-->Admintrative Tools-->Double -click Data sources(ODBC)-->click Add button-->I choose SQL server (last option), Is it right or wrong option for connecting to SQL 2000.Then a new screen appears Create a New dataSource-->in name textbox,we can write anyname--Right or wrong. suppose i enter sonia, & my server name is .,so I enter . in server & click next button-->On the Next screen i have checked the option With Sql server authentication-- >Login Id-sa, Password-->Blank-->Click next button-->Next-- >Finish-->Then I click on button Test Data source-->Mesage Comes TESTS COMPLETED SUCCESSFULLY-->OK-->OK-->Ok. These steps we have to do or not for Connectivity using ODBC. If yes,then what after these steps we have to do??Plz reply me early ??Thx in advance.

6 Answers  


Is it possible to Access BackEnd procedures?

0 Answers  


What is ActiveX Document?

0 Answers   HCL,


What is the use of Scalewidth and ScaleHeight Proeperty?

0 Answers  


How to trap Data Base Error?

1 Answers  






what database you used in project?

2 Answers   Satyam,


Is it possible to Manipulate data through flexgrid? Explain.

0 Answers  


What is a toolbox in visual basic?

0 Answers  


Explain the working of templates?

0 Answers  


reading lines from a file by searching a word(instr) and copying to other textfile,but its only copying only one line but there are some other lines match criteria but not copying to the files

2 Answers  


What is the need of zorder method?

1 Answers  


What is the statement to extract 4 characters from the middle of a string?

1 Answers  


Categories