form_unload command to remain the form.??
-
i want to cancel the function to unload or exit the form when user click on the X button at the form. how can i did that? I have set the msgbox to prompt user but wat ever anwser i give the form will just close down... y?? ****here is the code: Private Sub Form_Unload(Cancel As Integer) Dim message, dialog, title, answer message = "Do you want to Exit?" dialogtype = vbYesNo + vbQuestion title = "DELIVERY ORDER" answer = MsgBox(message, dialogtype, title) If answer = vbYes Then savedo else: exit sub End If End Sub
-
i want to cancel the function to unload or exit the form when user click on the X button at the form. how can i did that? I have set the msgbox to prompt user but wat ever anwser i give the form will just close down... y?? ****here is the code: Private Sub Form_Unload(Cancel As Integer) Dim message, dialog, title, answer message = "Do you want to Exit?" dialogtype = vbYesNo + vbQuestion title = "DELIVERY ORDER" answer = MsgBox(message, dialogtype, title) If answer = vbYes Then savedo else: exit sub End If End Sub
Is this VB.NET ? I don't think so, but if it is, the closing event gets passed a Handled property in the event arg, you can set that to true to stop closing.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Is this VB.NET ? I don't think so, but if it is, the closing event gets passed a Handled property in the event arg, you can set that to true to stop closing.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
I thought it may be VB6. None of my advice applies, and I've never used VB6. As VB6 is officially obsolete, you should specify that's what you're using, people are bound to assume .NET otherwise.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
I thought it may be VB6. None of my advice applies, and I've never used VB6. As VB6 is officially obsolete, you should specify that's what you're using, people are bound to assume .NET otherwise.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
so do u know how to set the value in vb.net? wat command to use to cancel the closing of the form?
Yes, you do what I said. But, that is irrelevant, it's not going to help you in VB6, obviously.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
so do u know how to set the value in vb.net? wat command to use to cancel the closing of the form?
-