I need to change the location property of label1 from (50, 50) to (50, 70) when Button1 is clicked. This should be easy, but I can't get it to work.
views:
166answers:
1
+3
A:
What are you trying? I find the easiest thing to do is set the Top and Left properties individually:
label1.Left = 50;
label1.Top = 70;
Setting Location.X and Location.Y will probably result in a compile-time error, because Location is of type "Point", a value type.
Matt Hamilton
2009-02-11 01:42:12
+1 - this is a better way than Location
routeNpingme
2009-02-11 01:45:28
This works perfectly. Thanks!!
2009-02-11 06:59:44