We have ~150,000 lines of VB 6 code that will need to eventually ported to
VB.Net. Littered throughout this code is a variant of the conditional
if isLoaded("someform") then
do something with someform
else
do something else with someform
end if
....
someform.hide (or unload someform)
"someform" is usually, but not always a status message form. In some cases
it's a keyboard handling form. In others, it's simply been hidden to allow
access to it's current state and/or application specific public methods and
properties. There are even a few cases where someform is a "form" variable
that gets loaded and dumped with the scope of the referencing code, but I'm
not worried about these right now as these will be the last to be ported.
I'm aware that many of these programs will require serious rework - to the
extent of dumping the old code entirely in a couple of cases, but if there
is some way to identify when a form is in memory, that would be great.
Mike.
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:e9**************@tk2msftngp13.phx.gbl...
Hi Michael,
When a dialog is open, it loses only the focus when it is closed, so when
you are in another form you are sure that it is closed.
A form is not "loaded" anymore as in VB6, the form handling in that was a
little bit strange to make things easy I have readed here.
So try first why you need it and check than if it still is your problem.
(The approaches for all three forms are different)
Usually a Dialog, but it could also be normal.
I hope that I understand your question well, otherwise reply, however
please with a concrete problem.
Cor