|
|
Problem with setting ico in property box |
|
Author |
Message |
Bj&#248&#59;rnar S.

|
Posted: .NET Base Class Library, Problem with setting ico in property box |
Top |
When using standard PropertyGrid with an object with a Image type property, I try to browse for a file, and when choosing this one .ico file, I get exception: "Parameter is not valid"
.Ico file properties: 16x16, 16777216 colors
Output: A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll Additional information: Parameter is not valid.
Stack Trace: System.Drawing.dll!System.Drawing.Image.FromStream(System.IO.Stream stream, bool useEmbeddedColorManagement, bool validateImageData) + 0x1a6 bytes System.Drawing.dll!System.Drawing.Image.FromStream(System.IO.Stream stream) + 0x9 bytes System.Drawing.Design.dll!System.Drawing.Design.ImageEditor.LoadFromStream(System.IO.Stream stream) + 0x71 bytes System.Drawing.Design.dll!System.Drawing.Design.ImageEditor.EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value = {System.Drawing.Bitmap}) + 0x215 bytes System.Windows.Forms.dll!System.Windows.Forms.PropertyGridInternal.GridEntry.EditPropertyValue(System.Windows.Forms.PropertyGridInternal.PropertyGridView iva = {System.Windows.Forms.PropertyGridInternal.PropertyGridView}) + 0x4c bytes System.Windows.Forms.dll!System.Windows.Forms.PropertyGridInternal.PropertyDescriptorGridEntry.EditPropertyValue(System.Windows.Forms.PropertyGridInternal.PropertyGridView iva) + 0x13 bytes System.Windows.Forms.dll!System.Windows.Forms.PropertyGridInternal.PropertyGridView.PopupDialog(int row) + 0x703 bytes System.Windows.Forms.dll!System.Windows.Forms.PropertyGridInternal.PropertyGridView.OnBtnClick(object sender, System.EventArgs e) + 0x87 bytes
.NET Development30
|
|
|
|
 |
nobugz

|
Posted: .NET Base Class Library, Problem with setting ico in property box |
Top |
Redesign your icon to use no more than 256 colors.
|
|
|
|
 |
|
|