Why my second form is missing after using another application in Visual Basic 6

Hi guys,

I have form-A and Form-B, the form A is my main form and has the menu and also remains visible until the application is closed, when I choose an option from main menu, the program opens Form-B that becomes the active window and the main form becomes disabled. When I close Form-B, the Form-A becomes enabled again, so everything works perfect.

The problem is when I use another application let's say:

I have my main form-A and my form-B running suddenly, I open MSWord to do something and it becomes the active window, at this point everything is ok, but when I return to my Application, the form-B is missing and only see the Form-A, but disabled. So Where is my Form-B?

Thank you so much guys in advance.
elm9999Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ess KayEntrapenuerCommented:
the form b is in the background

What you should do instead of disabling it is to hide it
Set form1.visible = false

Or use it like an MDI

if you minimise word, you will see form2 is still there, behind it
0
Randy PooleCommented:
You can also on the form_show of form a
if  not forma.enabled then formb.show
0
Mike TomlinsonMiddle School Assistant TeacherCommented:
When you display the second form, display it as modal and specify the current form as the owner:
http://msdn.microsoft.com/en-us/library/aa244181(v=vs.60).aspx
Private Sub cmdShowResults_Click()
   ' Show a modal form named frmResults.
   frmResults.Show vbModal, Me
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
elm9999Author Commented:
Thank you so much guys.

Its' already done with Mike option.

Thank's
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.