For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Controls > January 2006 > How to know usercontrol's left & top









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to know usercontrol's left & top
Steven

2006-01-12, 3:59 am

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, 7:59 am

Hi Steven:

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

MyLeft = UserControl.Extender.Left

hth,

Doug.

"Steven" <aa@hotmail.com> wrote in message news:OobIxo1FGHA.376@TK2MSFTNGP12.phx.gbl...
> 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, 7:07 pm

But, beware that not all hosts support all properties of the Extender!
--
Be the 10,000th Signer!
http://classicvb.org


Douglas Marquardt wrote:[color=darkred]
> Hi Steven:
>
> Have a look in the vb docs at the "Extender" object, i.e.
>
> MyLeft = UserControl.Extender.Left
>
> hth,
>
> Doug.
>
> "Steven" <aa@hotmail.com> wrote in message
> news:OobIxo1FGHA.376@TK2MSFTNGP12.phx.gbl...



Steven

2006-01-12, 9:58 pm

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

"Karl E. Peterson" <karl@mvps.org> дÈëÓʼþ
news:e1n%23FR6FGHA.3864@tk2msftngp13.phx.gbl...
> But, beware that not all hosts support all properties of the Extender!
> --
> Be the 10,000th Signer!
> http://classicvb.org
>
>
> Douglas Marquardt wrote:
>
>
>



alpine

2006-01-13, 4:00 am

On Fri, 13 Jan 2006 11:00:57 +0800, "Steven" <aa@hotmail.com> wrote:

>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'tspam@mvps.org
Karl E. Peterson

2006-01-13, 7:04 pm

Steven wrote:
> 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


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com