15,999,253 members
1.00/5 (1 vote)
See more:
Can someone help me?

I am trying to change the the location of the point inside the object, eg it's on the top left hand corner side of the object. Is it possible to change the location of that point? if so, how?
Posted
Updated 10-Feb-11 20:20pm
v2
Albin Abel 11-Feb-11 1:32am
Are you mean the graphic point? If you can access the point then how @ the x and y of it. The coordinates refers to the objects coordinate space.

May be you need to explain more @ your problem
[no name] 11-Feb-11 1:34am
Yes I mean the comer on the x/y point of the object

## Solution 1

You can do it, but you have to either assign a new Point:
`myControl.Location = new Point(myControl.Location.X + 10, myControl.Location.Y - 20);`

or by moving the Top and / or Left Properties:
```myControl.Left += 10;
myControl.Top -= 20;```

[no name] 11-Feb-11 3:14am
But doesn't that just change the position of the whole object?
OriginalGriff 11-Feb-11 3:55am
Isn't that what you are trying to do?
If not, then please explain in more detail what you are trying to achieve!
[no name] 11-Feb-11 4:00am
Its not. well as you know there is a point in a picturebox its about 1 pixel in the top left hand corner and that is what you can tell where the location of the object is, but im looking within the object where the point is in the box that shows the location, not the location of the whole object of the box, i wanna change the location of the top left hand corner of the box to a different place, eg. center, or i could increase the diameter of the point in the box. I hope that explains it
OriginalGriff 11-Feb-11 4:07am
No. I am none the wiser.
"about 1 pixel in the top left hand corner and that is what you can tell where the location of the object is" - Nope, never heard of it. How can you tell?
[no name] 11-Feb-11 4:22am
Well take

If (Death.Bounds.Contains(You.Location))
{
LOL.text = "Im in the box";
}

As a example then, if the top part of the box in that part the code will execute but if the bottom of the box is in there, nothing will happen