Click here to Skip to main content
15,908,581 members
Home / Discussions / C#
   

C#

 
AnswerRe: Unit Test a database update code? Pin
LLambert8-Oct-10 0:43
LLambert8-Oct-10 0:43 
AnswerRe: Unit Test a database update code? Pin
Richard A. Dalton8-Oct-10 6:00
Richard A. Dalton8-Oct-10 6:00 
QuestionFlowLayourPanel only removes visible control? [modified] Pin
Charles Cox7-Oct-10 16:06
Charles Cox7-Oct-10 16:06 
AnswerRe: FlowLayourPanel only removes visible control? Pin
Luc Pattyn7-Oct-10 16:30
sitebuilderLuc Pattyn7-Oct-10 16:30 
GeneralRe: FlowLayourPanel only removes visible control? Pin
Charles Cox7-Oct-10 16:46
Charles Cox7-Oct-10 16:46 
GeneralRe: FlowLayourPanel only removes visible control? Pin
Luc Pattyn7-Oct-10 16:53
sitebuilderLuc Pattyn7-Oct-10 16:53 
GeneralRe: FlowLayourPanel only removes visible control? Pin
Charles Cox7-Oct-10 17:03
Charles Cox7-Oct-10 17:03 
GeneralRe: FlowLayourPanel only removes visible control? Pin
Luc Pattyn7-Oct-10 17:16
sitebuilderLuc Pattyn7-Oct-10 17:16 
if your PB is showing an image and holds the last reference to said image, you need to call Dispose() on that image (see the Image or Bitmap class in MSDN). So the right order is:
- get the image ref
- set PB.Image null
- dispose of Image

Your backward for loop is OK; forward would work also as long as you remove element zero all the time. What you forgot is the Controls collection gets adapted every time you add/remove something (that also was why foreach did not accept the removal). The best way to remove all is:
while (!collectionEmpty) { doWhatItTakesOnElementZero(); removeElementZero(); }


Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: FlowLayourPanel only removes visible control? Pin
Charles Cox7-Oct-10 17:24
Charles Cox7-Oct-10 17:24 
GeneralRe: FlowLayourPanel only removes visible control? Pin
Luc Pattyn7-Oct-10 17:29
sitebuilderLuc Pattyn7-Oct-10 17:29 
GeneralRe: FlowLayourPanel only removes visible control? Pin
Charles Cox7-Oct-10 17:33
Charles Cox7-Oct-10 17:33 
GeneralRe: FlowLayourPanel only removes visible control? Pin
Luc Pattyn7-Oct-10 17:36
sitebuilderLuc Pattyn7-Oct-10 17:36 
QuestionHow to present an openning screen (form) in C# application? Pin
Shultz 27-Oct-10 9:23
Shultz 27-Oct-10 9:23 
AnswerRe: How to present an openning screen (form) in C# application? Pin
Ian Shlasko7-Oct-10 9:40
Ian Shlasko7-Oct-10 9:40 
GeneralRe: How to present an openning screen (form) in C# application? Pin
Luc Pattyn7-Oct-10 9:59
sitebuilderLuc Pattyn7-Oct-10 9:59 
GeneralRe: How to present an openning screen (form) in C# application? Pin
Shultz 27-Oct-10 10:55
Shultz 27-Oct-10 10:55 
GeneralRe: How to present an openning screen (form) in C# application? Pin
Luc Pattyn7-Oct-10 11:01
sitebuilderLuc Pattyn7-Oct-10 11:01 
GeneralRe: How to present an openning screen (form) in C# application? Pin
Shultz 27-Oct-10 13:07
Shultz 27-Oct-10 13:07 
GeneralRe: How to present an openning screen (form) in C# application? Pin
Luc Pattyn7-Oct-10 13:24
sitebuilderLuc Pattyn7-Oct-10 13:24 
AnswerRe: How to present an openning screen (form) in C# application? Pin
#realJSOP7-Oct-10 23:39
professional#realJSOP7-Oct-10 23:39 
QuestionAdd in module Pin
Wamuti7-Oct-10 6:28
Wamuti7-Oct-10 6:28 
AnswerRe: Add in module Pin
Nish Nishant7-Oct-10 8:19
sitebuilderNish Nishant7-Oct-10 8:19 
AnswerRe: Add in module Pin
Kelvin Armstrong7-Oct-10 11:03
Kelvin Armstrong7-Oct-10 11:03 
AnswerRe: Add in module Pin
Chris Trelawny-Ross7-Oct-10 11:33
Chris Trelawny-Ross7-Oct-10 11:33 
AnswerRe: Add in module Pin
PIEBALDconsult7-Oct-10 18:40
mvePIEBALDconsult7-Oct-10 18:40 

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.