MJ,
Have a field storing the reference to formTools in formMain. When you
click the button, check the field. If the field is not null, then just do
nothing (or bring the form to the front).
If the field is null, then create a new instance of the form and store
it in the field. Also, add an event handler to the formTool's Closed event
to a method that will set the field to null when called.
Then just show the form.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"MJ" <no******@belmont.co.uk> wrote in message
news:12*************@corp.supernews.com...
I have an application with 2 forms (formMain and formTools)
formMain contains a button which if clicked opens formTools using
.show(this)
This works fine as when open formTools is over FormMain and you can still
select both forms.
My problem is that I want o prevent the used opening the formTools form
more than once.
I cannot use a modal form as I still want to be able to use both forms
when they are open.
Thanks in advance.
MJ