How do I add SubItems to a ListView control

Try code such as: ListViewItem item = new ListViewItem('NewItem'); item.SubItems.AddRange(new string[]{'SubItem1', 'SubItem2')}; listView1.Items.Add(item); listView1.Items.Add(new ListViewItem(new string[]{'item1', 'item2', 'item3', 'item4'}); listView1.View = View.Details;

In my UITypeEditor for a collection, how do I change the ‘(collection)’ string to a string of my own

The string ‘(Collection)’ is coming from the TypeConverter on that property, which is CollectionConverter. To modify this value, do the following… [TypeConverter(typeof(MyCollectionConverter)] public class MyCollection : SomeBaseCollectoin { // ... } internal class MyCollectoinConverter : System.ComponentModel.CollectionConverter { public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string)) { if (value is ICollection) { return 'You can return what ever string value you want here'; } } return base.ConvertTo(context, culture, value, destinationType); } } (from sburke_online@microsoft..nospam..com on microsoft.public.dotnet.framework.windowsforms)

How do I compile unsafe code in VS.NET

Click ‘Project | Properties’ from the menus. Select ‘Configuration Properties’ folder and the ‘Build’ item under that. Switch ‘Allow unsafe code blocks’ from ‘False’ to ‘True’. (from Ryan LaNeve on microsoft.public.dotnet.framework.windowsforms)

How do I convert a string to an double or int?

One way is to use static members of the Convert class in the System namespace. textBoxResult.Text = Convert.ToString(Convert.ToDouble(textBox1.Text) * Convert.ToDouble(textBox2.Text));

How can I have the control designer create the custom editor by calling the constructor with the additional parameters rather than the default constructor

You can do this by creating the editor yourself rather than allowing TypeDescriptor to do it: 1) Shadow the property you care about in your designer... protected override void PreFilterProperties(IDictionaryProperties props) { PropertyDescriptor basePD = props['MyProperty']; props['MyProperty'] = new EditorPropertyDescriptor(basePD); } 2) Create a property descriptor that 'wraps' the original descriptor private class EditorPropertyDescriptor : PropertyDescriptor { private PropertyDescriptor basePD; public EditorPropertyDescriptor(PropertyDescriptor base) { this.basePD = base; } // now, for each property and method, just delegate to the base... public override TypeConverter Converter { get { return basePD.Converter; } } public override bool CanResetValue(object comp) { return basePD.CanResetValue(comp); } // and finally, implement GetEditor to create your special one... 3) create your editor by hand when it’s asked for public override object GetEditor(Type editorBaseType) { if (editorBaseType == typeof(UITypeEditor)) { return new MyEditor(Param1, param2, param3); } return basePD.GetEditor(editorBaseType); } } (from sburke_online@microsoft..nospam..com on microsoft.public.dotnet.framework.windowsforms)