User control - remove control at runtime

T

Tomas Oplt

Visual Studio2002 Framework 1.0

I have userControl which contain some controls
If user remove at runtime remove control from the userControl
especially ComboBox, it is not possible to close the form !
Form does not react on clicking on the right upper corner.
Is there some solution for this to avoid this behavior.

I tryed to remove focus from the control before removing but it helps
only is some cases.

Thanks for help


--


Tomas Oplt

Tel: 603 171893
Mail: (e-mail address removed)
 
H

Herfried K. Wagner [MVP]

* "Tomas Oplt said:
Visual Studio2002 Framework 1.0

I have userControl which contain some controls
If user remove at runtime remove control from the userControl
especially ComboBox, it is not possible to close the form !
Form does not react on clicking on the right upper corner.
Is there some solution for this to avoid this behavior.

Maybe the famous "form close bug"?

C# code to repro the close bug:

<http://www.jelovic.com/binaries/WindowsFormsCloseBugDemo.zip>

Some information on the bug:

<http://makeashorterlink.com/?T2FC26194>

Fixed in .NET 1.1.
 

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