Hi Neil!
Thanks for that code - I am on the right lines but I still can't get my head round it - I can set the default on other properties just fine. I am missing something simple with this one...
I created a C# project ( my first :) ) to see your code working but it I could not build it - "D:\VSDotNet\WindowsApplication2\Form1.cs(81): The name '_testSize' does not exist in the class or namespace 'WindowsApplication2.Form1'"
I soon started getting little red squiggles everywhere as I tried to dim a private variable :)
Thanks anyway! I'll get there!
ATB
Chris
>Chris,
>
>I am not a VB guy so here is some C# showing how to set the DefaultValue attribute for Size.
>
>[DefaultValue(typeof(System.Drawing.Size), "100, 45")]
>public Size TestSize
>{
> get { return _testSize; }
> set
> {
> _testSize = value;
> }
>}
>
>When you go into the property grid you will see that the value is 0, 0 - however, when you right click and reset it will show as 100, 45.
>
>HTH
>Neil