CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Really Stupid Question

    The Help for the ImageList control says it can be used as a source for the PictureBox control, but I will be damned if I can figure out how to put a picture in the PictureBox from an ImageList.
    The Help also discusses the .Overlay method, along with a sample, which works. When I try this:

    Picture1.Picture = ImageList1.ListImages(1)
    'or this
    set Picture1.Picture = ImageList1.ListImages(1)



    it gives me a type mismatch. The Imagelist does have valid images in it

    John G

  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Really Stupid Question

    You missed the .Picture at the end

    Picture1.Picture = ImageList1.ListImages(1).Picture

    works fine.


  3. #3
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Really Stupid Question

    I told you it was a really stupid Question.

    John G

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

Featured