How to know usercontrol's left & top

S

Steven

Dear All,

I develop a vb usercontrols, When user insert this component at windows form
or powerpoint, I want to know this usercontrols 's left and top, but
usercontrols has not left and top property when we write code in this
usercontrols! anyone tell me how to know it? thanks!

Best Regards
Steven
 
D

Douglas Marquardt

Hi Steven:

Have a look in the vb docs at the "Extender" object, i.e.

MyLeft = UserControl.Extender.Left

hth,

Doug.
 
S

Steven

Thanks!

I found it is distance postion with current windows! I want to know left
postion with current screen! Do u know how to get it? Thanks!
 
A

alpine

Thanks!

I found it is distance postion with current windows! I want to know left
postion with current screen! Do u know how to get it? Thanks!

Have a look at the ClientToScreen API function.

HTH,
Bryan
_______________________________
Bryan Stafford
New Vision Software
newvision_don'[email protected]
 
K

Karl E. Peterson

Steven said:
I found it is distance postion with current windows! I want to know
left postion with current screen! Do u know how to get it? Thanks!

Call GetWindowRect(UserControl.hWnd, ...)
 
Top