CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: control

  1. #1
    Join Date
    Sep 2000
    Posts
    58

    control

    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.


  2. #2
    Join Date
    Sep 2000
    Posts
    58

    Re: control

    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.


  3. #3
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: control

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured