none
VB 2005 has no Image control? RRS feed

  • Question

  • I'm just a casual hobbyist, but I'd appreciate any suggestions or advice.

     

    Until very recently I've been using VB6 to make a chess program as a hobby. I found the Image control very useful for layering many images over each other, such as pieces and the chessboard. I've just started using VB 2005 and found no Image control. So I'm lost - is there any way I can add the same control or similar to the design-time toolbox? If not what other ways are there to use .ico files?

     

    PS The simplest ideas are best. Like I said I'm just a hobbyist.

     

    Thank you!

    Tuesday, March 27, 2007 3:51 AM

Answers

  • Use a picturebox control it is in the default toolbox, it should have similar behaviours as the vb6 image control. You can use vb 2005 to open your vb6 project and it will convert it to vb.net for you.
    Tuesday, March 27, 2007 5:37 AM

All replies

  • Use a picturebox control it is in the default toolbox, it should have similar behaviours as the vb6 image control. You can use vb 2005 to open your vb6 project and it will convert it to vb.net for you.
    Tuesday, March 27, 2007 5:37 AM
  • Thank you for responding!

     

    Yes, I've used picturebox control before but it seems that in vb2005 it won't accept .ico (icon) files which were easily used with transparent backgrounds to layer images and have other images come through, for example in vb6 i could have image controls containing chess pieces as .ico files and the image (with a transparent background) allowed the picturebox behind it of a chessboard to come through.

     

    I've been struggling with the picturebox in vb2005 to get it to do something similar, giving them transparent backgrounds and allsorts but unless they can hold .ico files it throws me out quite a bit. The problem arises when i click on any elipsis to put an image into the picturebox, try loading a .ico file into the vb2005 resources folder that ties in with the project as a whole and an error message pops up saying the file is not a valid one - .ico files are not accepted.

     

    It would look awful without some means of transparency for the pieces. I found another option a long time ago involving a DLL call about bitmap images, it was hell! Sad

     

    Any other ideas? Otherwise I'll stick to vb6 and try vb2005 next year for some other project.

    Thursday, March 29, 2007 3:51 AM
  • The picturebox control does accept *.ico files even if they have transparent backgrounds. If your particular icon files are being rejected you may need to open them with an icon editor and modify the format. I have had the best luck with icons that contain only one image.
    Thursday, March 29, 2007 6:16 AM
  • You could try converting your images to a .GIF image.  If you use the freeware program GIFFY, it will resave an image as a .GIF and make a specified color in the image transparent.  The .GIF file should be compatible then.
    Sunday, November 25, 2012 10:15 PM