How to get the screen location

D

DarkPilgrim

I want to get child controls' screen location while their parent has a
scroll bar.
When I scroll the panel, the contained item's client location doesn't
change. If I use ClientToScreen, I get wrong
point, which includes scroll distance.
How to get the correct screen location? Thx!
 
C

ClayB

Is this what you tried?

Point screenPoint =
parent.PointToScreen(child.Location);

===================
Clay Burch
Syncfusion, Inc.
 
D

DarkPilgrim

Is this what you tried?

Point screenPoint =
parent.PointToScreen(child.Location);

===================
Clay Burch
Syncfusion, Inc.

Yes.But when parent has a scroll bar, I get incorrect screen location.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top