Fergus,
Fundamentally it is a class for sure. The question that, maybe, you are
trying to rise is that this class inherits System.ValueType, but that is a
long question.. They are not Pascal-like (VB6-like) structures.
And more. Size.Width and Size.Height are not read-only properties from Size.
The problem was that Woody was trying to access indirectly the Form.Size. It
can't.
Look at this code. It will work too:
Dim MySize as Size
MySize = Me.Size ' value assignment
MySize.Width = 294
Me.Size = MySize ' value assignment again
The indirect assignment uses a "temporary allocation" that will raise the
error:
Me.Size.Width = 294
Look at this topic from MSDN: "Expression is a value and therefore cannot be
the target of an assignment" from Visual Basic Reference Error Messages.
-------------------------------
Rafael Pivato
"Fergus Cooney" <filter-(E-Mail Removed)> escreveu na mensagem
news:(E-Mail Removed)...
> Hi Rafael,
>
> Size <is> a structure, but its fields are read-only in Controls, for
some
> reason.
>
> Regards,
> Fergus
>
>
|