Click here to Skip to main content
15,886,422 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: how to simulate the image layer , like the one in Photoshop Pin
Thomas Stockwell10-Nov-08 1:16
professionalThomas Stockwell10-Nov-08 1:16 
GeneralRe: how to simulate the image layer , like the one in Photoshop Pin
Dave Kreskowiak10-Nov-08 3:12
mveDave Kreskowiak10-Nov-08 3:12 
QuestionHow to stop installation in Setup Project 2008? Pin
praful_udade6-Nov-08 20:44
praful_udade6-Nov-08 20:44 
QuestionAny way to purge a Dictionary of items meeting some criterion? Pin
supercat96-Nov-08 9:36
supercat96-Nov-08 9:36 
AnswerRe: Any way to purge a Dictionary of items meeting some criterion? Pin
PIEBALDconsult6-Nov-08 10:19
mvePIEBALDconsult6-Nov-08 10:19 
GeneralRe: Any way to purge a Dictionary of items meeting some criterion? Pin
supercat96-Nov-08 11:31
supercat96-Nov-08 11:31 
AnswerRe: Any way to purge a Dictionary of items meeting some criterion? Pin
Dave Kreskowiak6-Nov-08 10:23
mveDave Kreskowiak6-Nov-08 10:23 
GeneralRe: Any way to purge a Dictionary of items meeting some criterion? Pin
supercat96-Nov-08 11:14
supercat96-Nov-08 11:14 
Dave Kreskowiak wrote:
...invalidate the Enumerator all in one shot. As you've found out, you cannot modify a collection during an Enumeration ("for each" operation).


The whole idea of having an object return an enumerator that supported a DeleteAndMoveNext object would be that such a function would do whatever was necessary to avoid jinxing the enumerator. Note that the DeleteAndMoveNext would not be a general-purpose delete; it could only delete the current object. A simple implementation for an array-based list, if one wanted deletes to be performed immediately, would be to move down all objects above the present object, without bumping the object index. A singly-linked list object whose iterator kept a pointer to the previous object could 'swing' that pointer to point to the object following the present one and then advance the present object (note that this would be much faster than doing a search-and-delete).

An alternative general approach to allow deletions while traversing an iEnumerable object would be to have the 'delete' function mark an item as invalid (using either a 'valid' flag or a sentinel value) and also set a flag in the collection to indicate that one or more deletions had taken place. If 'add' operations are not allowed during an enumeration, the next add operation could check whether any items are marked for deletion (using the collection's flag to start with) and then remove all items that are so marked. For an array-based implementation, this could be much faster than having all deletes performed 'instantly'.
GeneralRe: Any way to purge a Dictionary of items meeting some criterion? Pin
Luc Pattyn6-Nov-08 11:39
sitebuilderLuc Pattyn6-Nov-08 11:39 
GeneralRe: Any way to purge a Dictionary of items meeting some criterion? Pin
supercat96-Nov-08 12:14
supercat96-Nov-08 12:14 
QuestionHow to pass arrays as paramter to typed dataset Pin
Member 20986146-Nov-08 1:57
Member 20986146-Nov-08 1:57 
QuestionwebBrowser and transparent background Pin
mdzieg5-Nov-08 7:14
mdzieg5-Nov-08 7:14 
AnswerRe: webBrowser and transparent background Pin
Dave Kreskowiak5-Nov-08 14:00
mveDave Kreskowiak5-Nov-08 14:00 
GeneralRe: webBrowser and transparent background Pin
mdzieg6-Nov-08 1:13
mdzieg6-Nov-08 1:13 
Questionsome problems,help me! Thank you! Pin
bozin5-Nov-08 5:50
bozin5-Nov-08 5:50 
GeneralRe: some problems,help me! Thank you! Pin
Luc Pattyn5-Nov-08 13:52
sitebuilderLuc Pattyn5-Nov-08 13:52 
Questionproblems about datagridview in C# winforms Pin
bozin4-Nov-08 6:03
bozin4-Nov-08 6:03 
QuestionRe: problems about datagridview in C# winforms Pin
led mike4-Nov-08 6:37
led mike4-Nov-08 6:37 
AnswerRe: problems about datagridview in C# winforms Pin
bozin4-Nov-08 6:54
bozin4-Nov-08 6:54 
GeneralRe: problems about datagridview in C# winforms Pin
led mike4-Nov-08 7:31
led mike4-Nov-08 7:31 
AnswerRe: problems about datagridview in C# winforms Pin
nelsonpaixao7-Nov-08 14:37
nelsonpaixao7-Nov-08 14:37 
QuestionVSTO Application Deployment Pin
tozy3-Nov-08 19:15
tozy3-Nov-08 19:15 
Questionhow to disable paste event for a textbox Pin
lakshmichawala3-Nov-08 19:07
lakshmichawala3-Nov-08 19:07 
AnswerRe: how to disable paste event for a textbox Pin
dan!sh 3-Nov-08 21:00
professional dan!sh 3-Nov-08 21:00 
AnswerRe: how to disable paste event for a textbox Pin
Thomas Stockwell6-Nov-08 8:40
professionalThomas Stockwell6-Nov-08 8: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.