Results 1 to 2 of 2

Thread: Retrieving a ImageList icon from an ocx

  1. #1

    Thread Starter
    Member po69's Avatar
    Join Date
    Nov 2002
    Location
    po69.location
    Posts
    36

    Post Retrieving a ImageList icon from an ocx

    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.
    po2002

  2. #2

    Thread Starter
    Member po69's Avatar
    Join Date
    Nov 2002
    Location
    po69.location
    Posts
    36

    Another example

    I have a listview in an ocx control "ocxcontrol1"

    Can I refer to the listview with something like

    ocxcontrol.listview1.listitems....

    ?

    Is it possible? is there any workaround for it?
    po2002

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