Results 1 to 3 of 3

Thread: return usercontrol name to ActiveX control

  1. #1

    Thread Starter
    Hyperactive Member billwagnon's Avatar
    Join Date
    Jul 1999
    Location
    St. Louis, Missouri, Mississippi Valley
    Posts
    290

    Arrow return usercontrol name to ActiveX control

    I have made an ActiveX control based on the combobox that saves the current text to the registry, and populates the combobox with prior entries.

    This is used for selecting files, and being able to drop down to see prior files selected.

    This works fine when I have one of the new controls on the form, because I use the name of the control as the registry key.

    What I want to do is allow multiple ActiveX controls of this type on the form, with each one writing to the registry with its own name as key.

    So far when I try to get the usercontrol.name, I just get the name of the ActiveX control, not the new name that is assigned when the control is dropped on a standard exe form.

    Any ideas? I think there must be some way to pass the name of the instantiated control back to the ActiveX code.

  2. #2
    New Member
    Join Date
    Jan 2002
    Location
    Bandung - Indonesia
    Posts
    14

    Perhaps....

    Hi Bill,
    I read MS Press Book "Desktop Application With VB 6.0"
    and found this interesting object called Extender.
    Extender can be used for getting property values
    that we set at design time. To catch the name property
    value, I use this code :

    Combo1.AddItem Extender.Name

    Hopes that works for you....
    K I
    is in the house

    Mail me
    ==========================
    "Finally VB is getting closer to Java haha"

  3. #3

    Thread Starter
    Hyperactive Member billwagnon's Avatar
    Join Date
    Jul 1999
    Location
    St. Louis, Missouri, Mississippi Valley
    Posts
    290
    okipwn,

    That doesn't seem to work. I'm confused by the AddItem; I want the name of the control, not the text of the cbo, and the items aren't really relevant.

    But I will research the Extender object and see what I can find. Thanks for the tip.

    Bill

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