Hi all,
I met an stranger issue.
we know that the Form has a property "Location", it representive the screen coordinate....
no doubt about it.
However, when we setparent for this window, the condition changed.
Test sample code:
//********************************************************
//get current location of the form. it will be in screen coordinate.
Point lOldPt = Location;
//update this point
Point lNewPt = new Point(lOldPt.x, lOldPt.y);
//assign the new point after update to the location property.
Location = lNewPt;
//****************************************************
After assigned for the Location proptery, we get that the new value for the Location is different from the value lNewPt;
seem there is a conversion inside the assign operation.
and the value assign to the Location should be client coordinate, otherwise, it will not work as you expected.
This is really strange issue..
why we need to assign the client coordinate to it. however, if you get it, it will return screen coordinate???
what doed .net inside done????
However, if the form is not a child form, it will worked normally as usually.
Does anayone can explain on this????
I am urgent waiting for you....
Thanks in advance.