dynamicaly remove controle

  • Thread starter Thread starter Romain TAILLANDIER
  • Start date Start date
R

Romain TAILLANDIER

Hi group !

I have form where i dynamically add controls.
when i want to remove one of the controle added, i detect the corresponding
event, then use the command :
this.controls.remove(MyControlToRemove);
and all seems to work fine.

But when i try to close the form (by clicking on the X button in the rigth
top corner), it don't want to ! bad boy :(
i have to press the stop button on the debugger to stop the programm, but
other fonctionnalities still seems to work fine.

if i don't remove my control, there is no problem.
what do i do badly ?

thanks for help
ROM
 
ROM,

I can't reproduce the problem with Visual Studio .NET 2003.

Can you post some code?

Thank you,

Gabriele
 
Back
Top