Got three issues in an otherwise perfectly running CF

:
1. my skin is able to cause an exception dialog whereas usually error go in the error.log. The error pops up when I hit the mute button I've created. It only pops up when going from not muted to mute.
The error:
Code:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at centrafuse.tvslider.mainTimer_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.Callback(IntPtr hWnd, Int32 msg, IntPtr idEvent, IntPtr dwTime)
(
full error dump available)
The button definition:
Code:
<MUTE>
<X>0</X>
<Y>704</Y>
<WIDTH>128</WIDTH>
<HEIGHT>64</HEIGHT>
<FONTNAME>Century Gothic</FONTNAME>
<FONTSIZE>14</FONTSIZE>
<FONTSTYLE>Bold</FONTSTYLE>
<FONTCOLOR>#F2EFD1</FONTCOLOR>
<SECONDCOLOR>#000000</SECONDCOLOR>
<XOFFSET>0</XOFFSET>
<YOFFSET>0</YOFFSET>
<ENABLETEXT>False</ENABLETEXT>
<ALIGN>Center</ALIGN>
<TABINDEX>4</TABINDEX>
</MUTE>
Which is the same as for example my Random button (except for it's location of course

)
NB: after reloading CF, I haven't been able to reproduce this error...
2. Another error I caused, but might be handy to look into to prevent strange behaviour though human error/substandard skinning
Code:
26-11-2006 19:55:12
Value cannot be null.
Parameter name: image
at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y)
at System.Drawing.Graphics.DrawImageUnscaled(Image image, Rectangle rect)
at centrafuse.cfbase.OnPaint(PaintEventArgs e)
----------------------------------------------------------------------------------------------------------
Occur quite a lot, mainly because I've "disabled" some buttons and such in the skin I'm building... just to get them out of the way I've given them a width and height of 0.
Of course, that's something I've caused, but might be handy to build in a small check before just drawing these things?
3. Just a small one: when loading a list of mp3s with random mode on, it always starts at the first song in the list.
Bookmarks