|
-
Jan 15th, 2002, 04:19 PM
#1
Thread Starter
Hyperactive Member
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.
-
Jan 15th, 2002, 11:28 PM
#2
New Member
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"
-
Jan 16th, 2002, 07:53 AM
#3
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|