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'(e-mail address removed)
 
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, ...)
 

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