Click here to Skip to main content
15,884,473 members
Home / Discussions / C#
   

C#

 
Questionchange of status Pin
Member 1363217112-Feb-18 2:18
Member 1363217112-Feb-18 2:18 
AnswerRe: change of status Pin
Gerry Schmitz12-Feb-18 6:49
mveGerry Schmitz12-Feb-18 6:49 
AnswerRe: change of status Pin
Richard Deeming12-Feb-18 8:49
mveRichard Deeming12-Feb-18 8:49 
GeneralRe: change of status Pin
Member 1363217112-Feb-18 19:19
Member 1363217112-Feb-18 19:19 
GeneralRe: change of status Pin
Richard Deeming12-Feb-18 22:31
mveRichard Deeming12-Feb-18 22:31 
QuestionHow to manage dinamically generated user controls? Pin
alin111-Feb-18 13:12
alin111-Feb-18 13:12 
AnswerRe: How to manage dinamically generated user controls? Pin
Dave Kreskowiak11-Feb-18 17:29
mveDave Kreskowiak11-Feb-18 17:29 
AnswerRe: How to manage dinamically generated user controls? Pin
OriginalGriff11-Feb-18 20:15
mveOriginalGriff11-Feb-18 20:15 
Calling Dispose doesn't remove anything from anywhere, it just closes down and releases any resources the object used - which means that just calling Dispose on objects in the display will not only not work, but is very liable to throw an ObjectDisposedException[^] when it gets subsequently looked at.

Start by looking at how you add new objects, because that is where you need to delete them: an object can't delete itself, because it doesn't (or shouldn't) know what container it is held in.
If you add them to a panel:
C#
Item item = new Item();
myPanel.Controls.Add(item);
Then you need to remove them from the panel:
C#
myPanel.Controls.Remove(item);
item.Dispose();
But it's going to be similar for all other containers.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: How to manage dinamically generated user controls? Pin
BillWoodruff11-Feb-18 22:52
professionalBillWoodruff11-Feb-18 22:52 
GeneralRe: How to manage dinamically generated user controls? Pin
OriginalGriff11-Feb-18 23:06
mveOriginalGriff11-Feb-18 23:06 
GeneralRe: How to manage dinamically generated user controls? Pin
BillWoodruff12-Feb-18 0:24
professionalBillWoodruff12-Feb-18 0:24 
GeneralRe: How to manage dinamically generated user controls? Pin
OriginalGriff12-Feb-18 0:37
mveOriginalGriff12-Feb-18 0:37 
GeneralRe: How to manage dinamically generated user controls? Pin
BillWoodruff12-Feb-18 2:00
professionalBillWoodruff12-Feb-18 2:00 
GeneralRe: How to manage dinamically generated user controls? Pin
OriginalGriff12-Feb-18 2:07
mveOriginalGriff12-Feb-18 2:07 
GeneralRe: How to manage dinamically generated user controls? Pin
BillWoodruff12-Feb-18 5:44
professionalBillWoodruff12-Feb-18 5:44 
AnswerRe: How to manage dinamically generated user controls? Pin
BillWoodruff11-Feb-18 21:40
professionalBillWoodruff11-Feb-18 21:40 
GeneralRe: How to manage dinamically generated user controls? Pin
alin112-Feb-18 2:53
alin112-Feb-18 2:53 
GeneralRe: How to manage dinamically generated user controls? Pin
BillWoodruff12-Feb-18 4:39
professionalBillWoodruff12-Feb-18 4:39 
GeneralRe: How to manage dinamically generated user controls? Pin
alin112-Feb-18 7:15
alin112-Feb-18 7:15 
GeneralRe: How to manage dinamically generated user controls? Pin
BillWoodruff12-Feb-18 7:52
professionalBillWoodruff12-Feb-18 7:52 
GeneralRe: How to manage dinamically generated user controls? Pin
alin112-Feb-18 8:01
alin112-Feb-18 8:01 
GeneralRe: How to manage dinamically generated user controls? Pin
BillWoodruff12-Feb-18 9:13
professionalBillWoodruff12-Feb-18 9:13 
GeneralRe: How to manage dinamically generated user controls? Pin
alin112-Feb-18 9:27
alin112-Feb-18 9:27 
GeneralRe: How to manage dinamically generated user controls? Pin
BillWoodruff12-Feb-18 17:54
professionalBillWoodruff12-Feb-18 17:54 
Questionsevenzipsharp password Pin
Member 1367023411-Feb-18 10:15
Member 1367023411-Feb-18 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.