Discussion:
How to know usercontrol's left & top
(too old to reply)
Steven
2006-01-12 09:25:40 UTC
Permalink
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
Douglas Marquardt
2006-01-12 13:44:57 UTC
Permalink
Hi Steven:

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

MyLeft = UserControl.Extender.Left

hth,

Doug.
Post by 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
Karl E. Peterson
2006-01-12 18:16:12 UTC
Permalink
But, beware that not all hosts support all properties of the Extender!
--
Be the 10,000th Signer!
http://classicvb.org
Post by Douglas Marquardt
Have a look in the vb docs at the "Extender" object, i.e.
MyLeft = UserControl.Extender.Left
hth,
Doug.
Post by 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
Steven
2006-01-13 03:00:57 UTC
Permalink
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!
--
Best Regards
Steven
Post by Karl E. Peterson
But, beware that not all hosts support all properties of the Extender!
--
Be the 10,000th Signer!
http://classicvb.org
Post by Douglas Marquardt
Have a look in the vb docs at the "Extender" object, i.e.
MyLeft = UserControl.Extender.Left
hth,
Doug.
Post by 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
alpine
2006-01-13 06:10:58 UTC
Permalink
Post by 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!
Have a look at the ClientToScreen API function.

HTH,
Bryan
_______________________________
Bryan Stafford
New Vision Software
newvision_don'***@mvps.org
Karl E. Peterson
2006-01-13 18:44:17 UTC
Permalink
Post by Steven
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, ...)
--
Be the 10,000th Signer!
http://classicvb.org
Loading...