[RESOLVED] Still unloads form when i tell it to turn it visible=false? WHY?
First off, what does that mean at all? Modual? huh?????????? How is one of my forms a modual!? And how do i fix this? When i test it, it doesn't give me this error! Only when i make a .exe! Please help!
Another thing, when i do the Form_Unload, i put
form1.visible = false
But why does it still unload it? How can i get it to not do this? Thanks
Re: Run time error 401 Cant show non modual form when modual form is displaed?
1. Modal problem:
When a form is shown as Modal, you can't show any other non-modal forms without closing the modal form.
ie.Suppose there are 3 forms - Form1, Form2 and Form3.
You call Form2 from Form1 like this: And if you have coded in such a way that, you will show Form3 from Form1.
But note that, already you are displaying Form2 as modal to Form1. So, you can't show the Form3 from Form1. You have to close the first form, Form2 (modal form), inorder to show Form3.
2. Unloading problem:
Code:
Private Sub Form_Unload(Cancel As Integer)
Me.Hide '~~~ Hides the form
Cancel = 1 '~~~ Prevent the form from unloading
End Sub
Good luck...:wave:
Re: Still unloads form when i tell it to turn it visible=false? WHY?
But, i dont have code that has
frmSysTray.show vbModal
what does the vbModal do anyways?
Re: Still unloads form when i tell it to turn it visible=false? WHY?
I think this tutorial will shed some light on you: http://www.brainbell.com/tutors/Visu...r_Modeless.htm ...:wave:
Re: Still unloads form when i tell it to turn it visible=false? WHY?
Oh. Okay. xD Cool. thanks! (i see where the code came in for vbModal in my project).