Is there any way to do a certain command like delete (lol) when you click the X in the control box?
Printable View
Is there any way to do a certain command like delete (lol) when you click the X in the control box?
when the user clicks on the X in the control box, VB raises the Form_Queryunlod event. This event has a parameter called "unloadmode", the value of this varible is "0" or "vbFormControlMenu" (This is an enum value), if the form is being closed as a result of, that the user pressed the X or choose close from the control menu.