Closing a program automatically after use or Load once

Hi Experts,

A VB newbee question :)

From application A I can start application B.
if I click somewhere on application A, B will stay active somewhere behind the window of A.
the next time I start application B, a second instant will be started

What I like is:
The moment I click somewhere outside the form of Application B:
1. it must be closed or
2. I can not click on application A before I close B (like the modal style in forms)
3. if I click a second time, the samen instant of B must be used.

I prefer the first two version because when I close application A I don't need B anymore.

btw it's VB6.0

Thanks,
Murph
LVL 17
MurpheyApplication ConsultantAsked:
Who is Participating?
 
hesConnect With a Mentor Commented:
That will prevent any more instances of program B.
0
 
hesCommented:
In B put in form_load
If App.Previstance Then
  Me.Close
End If
0
All Courses

From novice to tech pro — start learning today.