Tharpa Roberts <ne*******@noyb.netwrote:
I'm trying to make a button that will change the location of the form. I
would have thought that the following code would do the trick:
this.Location.X = this.Location.X + 1;
The Location property returns a Point - which is a value type.
Basically, if the compiler let you do this, it wouldn't do what you
wanted anyway.
Instead, to use just Location, you'd need:
Location = new Point(Location.X+1, Location.Y);
There may be a better way, although I can't see one immediately.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too