PDA

Click to See Complete Forum and Search --> : Picture Property


Yonatan
Dec 7th, 1999, 10:26 PM
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 (http://www.icq.com/19552879)
AIM: RYoni69

Mark Sreeves
Dec 8th, 1999, 02:19 PM
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

Aaron Young
Dec 9th, 1999, 12:06 AM
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

Yonatan
Dec 9th, 1999, 01:22 AM
... 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 (http://www.icq.com/19552879)
AIM: RYoni69

PietHein
Dec 9th, 1999, 06:05 PM
I've used asyncread, got no examples but you can look in help

Bye

Mark Sreeves
Dec 9th, 1999, 06:43 PM
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).]

Yonatan
Dec 10th, 1999, 05:36 AM
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 (http://www.icq.com/19552879)
AIM: RYoni69

Yonatan
Dec 10th, 1999, 05:44 AM
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 (http://www.icq.com/19552879)
AIM: RYoni69