Results 1 to 8 of 8

Thread: Picture Property

  1. #1

    Thread Starter
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    I'm creating an ActiveX control. This control has a Picture property. In design mode, when I click the Picture property in the Properties Window, I see a button with an ellipsis on it (...).
    When I click this button, I get the Open common dialog, which lets me choose a picture.
    Is there a way to modify this button, so that you could only choose ICO files?

    Or even better - is there a way to get the Picture property to accept any type of file, and then internally convert it to a 32x32 icon? The Picture property should display (Icon) in the Properties Window.

    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: RZvika@netvision.net.il
    ICQ: 19552879
    AIM: RYoni69

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    Sorry for replying to this because it probably means that no one eles will! ( I usually read the ones with no replies first)

    Unless anyone else has a VB example, This might help:

    I found a little Delphi program called 2icon which converts bitmaps to icons.

    If you search for this the source code is also avaiable. It may be possible to base a VB program on that.

    I hope this has been some help.




    ------------------
    Mark Sreeves
    Analyst Programmer

    Mark.Sreeves@Softlab.co.uk
    A BMW Group Company

  3. #3
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    You can use an ImageList control, to which you can add the Image, then use the ExtractIcon Method to Generate an Icon of the Original Image.

    ------------------
    Aaron Young
    Analyst Programmer
    aarony@redwingsoftware.com
    adyoung@win.bright.net

  4. #4

    Thread Starter
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    ... which reminds me ... I do not want my ActiveX control to require any other ActiveX control ...

    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: RZvika@netvision.net.il
    ICQ: 19552879
    AIM: RYoni69

  5. #5
    New Member
    Join Date
    Oct 1999
    Location
    Amersfoort
    Posts
    15

    Post

    I've used asyncread, got no examples but you can look in help

    Bye

  6. #6
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    I think that once Aaron Young has posted a reply you can assume the topic to be closed!!

    [This message has been edited by Mark Sreeves (edited 12-10-1999).]

  7. #7

    Thread Starter
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    Mark: If you read Aaron's answer and my reply to his answer, and find them contradicting (which they are), you will probably assume I would like to have a second opinion!

    PietHein: Thanks, I will try looking for information on AsyncRead, whatever it is...

    Anyone: I'm still open for suggestions!

    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: RZvika@netvision.net.il
    ICQ: 19552879
    AIM: RYoni69

  8. #8

    Thread Starter
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    Ok, I read about the AsyncRead function and I don't see how it can help me do this... How did you mean?

    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: RZvika@netvision.net.il
    ICQ: 19552879
    AIM: RYoni69

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