Have a look at: http://msdn2.microsoft.com/en-us/library/system.collections.ienumerator(VS.80).aspx In particular: An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated and the next call to MoveNext or Reset throws an InvalidOperationException And: http://www.yoda.arachsys.com/csharp/threads/winforms.shtml Regards
ejuanpp
Posts
-
How do I make a thread safe call to a listview. -
How do I make a thread safe call to a listview. -
How do I make a thread safe call to a listview.I am not sure I understood everything but ... aren't you trying to iterate through listview items with a thread while eventually modifying the same collection with another one (the main one) ?
-
Object creation at internal condition in constructorWhy don't you use the factory pattern :)
-
How to use the operators DIV and MOD6 div 4 = 6 / 4 6 mod 4 = 6 % 4
-
Seeking: Panel Opacity & BorderSomething like this?
public partial class CustomPanel : Panel { Color color; public CustomPanel() { InitializeComponent(); color = Color.FromArgb(100, Color.Blue); } protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ExStyle |= 0x00000020; //WS_EX_TRANSPARENT return cp; } } protected override void OnPaintBackground(PaintEventArgs e){} protected override void OnPaint(PaintEventArgs e) { using (Brush brush = new SolidBrush(color)) { e.Graphics.Clear(Color.Transparent); e.Graphics.FillRectangle(brush, this.ClientRectangle); } } }
-
Seeking: Panel Opacity & BorderHi, Have you thought of creating another Form hosting your Panel ? Regards
-
[Message Deleted]Hi, Comments about what ?
-
Code Analysis, Thread optimizationHi, what about Rational PurifyPlus ? Regards
-
Stream & fileFileInfo.MoveTo should do the trick
-
CheckListBox ...selct singlr itemchkListBox.SelectedIndex = index; chkListBox.SetItemCheckState(index, CheckState. ...);
-
How can I have access to an arraylistIn (ServerInfo)(myServerArrayList[0]).strServerName ... It won't if the cast is applied after having attempted to retrieve the strServerName in (myServerArrayList[0]) which is recognized as an object type instance.
-
How can I have access to an arraylistSince anything derived from object can be stored in your ArrayList, Intellisense does not "know" what kind of object is stored in the 0th position. You need to cast it before: ((ServerInfo)myServerArrayList[0]). ... or use something more appropriate than ArrayList. Try List<ServerInfo> :)
-
Mouse Rotation (CW or CCW)Take three different sample points A, B, C visited by your mouse. Compute the vectors AB = v1 (v1x, v1y) , AC = v2 (v2x, v2y). Sign of v2x* v1y - v1x * v2y will tell you the result: positive = clockwise. 0 = aligned visited points negative ... Regards
-
MIDI to Guitar TablatureChristian Graus wrote:
No, you're wrong. MIDI has no concept of the same note living in more than one place, so it doesn't contain any info about how to play the note on guitar.
Why am I wrong, just because I say that coverting MIDI to TAB would not be entirely a rendering detail ? I was just pointing out that there are different rendering possibilities and that it is not as simple as that.
Christian Graus wrote:
No system that I have seen does a good job of choosing 'default' fingerings, you always end up having to edit them.
I was talking about that algorithm. Regards
-
MIDI to Guitar TablatureIt is not totally a rendering detail since each note can be rendered in several places :)
-
iterating arraylistsA solution may be copying the arraylist and iteration over the copied version :)
-
URGENT : Display HTML Document into an Application FormUse the WebBrowser control :)
-
vb6 algorithmIt is sad to read this kind of statements here. Helping each other is the main purpose of these forums. Not comparing IT staffs :(
-
Detect and Read Pen driveCan you be a bit more specific?