Click to See Complete Forum and Search --> : control
uni
April 7th, 2001, 05:50 AM
Hi,
Just a quick question. I need to create an activex which needs to be able to access the width of the form it is added to. However, I cannot use me.width in the activex control and obviously l can't call a particular form name as it is to be reused. Any sugguestions?
THANKS.
uni
April 7th, 2001, 06:02 AM
I just want to add something.
Do you know how to tell when the form in which the activex has been placed has been resized. The idea is that when the form is resized I set the width of the activex to equal the width of the form. Ideally I do not want to have to add any code to the main form. I just want to add the activex.
Thanks.
John G Duffy
April 7th, 2001, 09:38 AM
Try looking at the Container's Extender Object. I don't know a whole about this subject but it gives you some information regarding the container on which your control is housed. MSDN "Extender Object and events for controls" gives some insight. I do know that if your control is contained in a Frame then Extender.Name will give you the name of the Frame and Extender.Zorder will react just like using Form1.ZOrder
' In your case, try "Extender.Width"
Hope this helps,
John G
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.