Hi everybody and tnx for your time.


main program="program where I insert the ocx control"

I have created a small ocx to choose between different icons. This ocx has a imagelist and some controls to display the different icons in the imagelist.

Function ChosenIcon() as ??????????
'This function is inside the ocx so I can call it from the main
' program and retrieve the icon the user has selected


??????


end function


The problem is that in the ocx I have a imagelist and on it several icons, I know how to give back to the main program the index value for the specific icon the user has selected, but not how to pass the icon itself.

I can copy to the main program also another imagelist with the very same icons but I don't like it too much.


Something in the ocx like

function ChosenIcon() as containedcontrol.imagelist1

So I can call it from the main program with something like

whatIwant=mynewocx.ListImages(selected).SmallIcon

would be great but I guess it is not possible.
hope the problem is somewhat clear and you can help me!!

best thanks and excuse my english.