Forms: Close Dialog weird problem

T

Thiago Macedo

Hello everybody. I'm experiencing an strange problem with WinForms
which someone, if possible, could help me to deal with.

We have a windows application which serves as a menu, calling other
forms in different class library, all called as Modal Dialog.
In one of this forms, I have another call to a Modal. When this second
modal is closed, automatically is closed the form who called it.
I can't understand how this is happening. After the end of the sub
which calls the second modal the program goes to closing event.
I'm closing the second modal explicity (me.close) and showing it with
a instance.show().

could some help me?
(sorry for the bad english)

[]'s
 
A

Armin Zingler

Thiago Macedo said:
Hello everybody. I'm experiencing an strange problem with WinForms
which someone, if possible, could help me to deal with.

We have a windows application which serves as a menu, calling other
forms in different class library, all called as Modal Dialog. In one
of this forms, I have another call to a Modal. When this second
modal is closed, automatically is closed the form who called it. I
can't understand how this is happening. After the end of the sub
which calls the second modal the program goes to closing event. I'm
closing the second modal explicity (me.close) and showing it with a
instance.show().

Do you show the 3rd Form in a Button_Click event? If yes, check the
DialogResult property of the Button. If it is not 'None', the Form
closes automatically.


Armin
 
T

Thiago Macedo

Do you show the 3rd Form in a Button_Click event? If yes, check the
DialogResult property of the Button. If it is not 'None', the Form
closes automatically.

Armin

That's it!

Thank you. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top