BVO,
You could always use a Hashtable to keep track of the instances. Each
MDI child should generate a unique hashcode, so you could place the MDI
children into a Hashtable. Then, instead of getting the handle, you could
just check to see if the key exists in the hash, and if it does, then
activate the form.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
ni**************@exisconsulting.com
"BVO" <be**************@shipnet.no> wrote in message
news:0b****************************@phx.gbl...
I need to keep track of my MDI child forms to activate
any one of them whenever I need to.
There are two possibilities as far as I can see:
- each forms index in the MDIChildren collection
- each forms Handle property.
The first one doesnt offer my a unique reference cause
the indexes change when forms are closed. I guess I
should use the Handle but how do I activate a form based
on its Handle?
Any other way?
BVO