Doug wrote:
I'm using reflection to launch a form based on a click event from another
application. I want to be able to check if the form is active on the
desktop
and bring it upfront and not relaunch the form again and again.
Can someone tell me how to do this? Thanks, doug
You should store the reference to the form away when you create it, so
when you get there again, you can easily check if you've got the reference
already. But you'll also have to find a way to be informed if the form
closes, so you can reset the reference - you could introduce an event or a
callback that's called when the form is closing.
I guess this is really the only viable solution. You could go search
around with Windows API functions, but that's not a good solution to start
with and will be further complicated by the fact that you don't know
anything about the form in question (assuming you wouldn't want to store
the reference).
Oliver Sturm
--
Expert programming and consulting services available
See
http://www.sturmnet.org (try /blog as well)