Click here to Skip to main content
16,014,662 members
Home / Discussions / C#
   

C#

 
AnswerRe: Passing Objects From Child Form Back To User Control Pin
#realJSOP8-Oct-10 2:32
professional#realJSOP8-Oct-10 2:32 
QuestionToolbar editing example code please. Pin
Jung Sung Uk7-Oct-10 21:00
Jung Sung Uk7-Oct-10 21:00 
QuestionUnit Test a database update code? Pin
Shubhabrata Mohanty7-Oct-10 20:42
Shubhabrata Mohanty7-Oct-10 20:42 
AnswerRe: Unit Test a database update code? Pin
Abhinav S7-Oct-10 22:39
Abhinav S7-Oct-10 22:39 
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 
Charles Cox wrote:
Am I doing something wrong


Many things in fact.

1.
there is no need to remove the click handler if the control is going to disappear.

2.
within a foreach over some collection, you can't modify the collection. You can modify the content of the collection (say change a property), but you can't add or remove. If that is what you want to do, don't use foreach; use a regular for loop instead.

3.
if a PictureBox is showing an image that you created (say Image.FromFile or new Bitmap), then you should remove the image from the PictureBox, then dispose the image, and then dispose the PB.


Charles Cox wrote:
only seems to remove the ones that are visible.


you should state facts, as strict as possible. I suspect your situation is: the code throws an exception at the Remove() line. If so, say so. You'll get more/better/faster help, and you'll learn to help yourself by looking for detailed symptoms.

In all, visibility of PB's doesn't factor in as far as I can see.

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 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 
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 

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.