Results 1 to 2 of 2

Thread: Newbie Question

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Location
    China Lake, CA
    Posts
    12

    Newbie Question

    In VB I see two graphics oriented controls; the image control and the picture box control. Beyond the fact that the picture box has a frame around it, I don't see any immediate/obvious difference between these two but clearly there must be. So....

    What's the difference between the two and why would you use one over the other (and vise versa)?

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    The picture box is a lot more versatile, and so uses more resources. If I remember correctly the Image control doesn't have a hWnd/hDC (not directly from VB anyway), so you can do any API based graphics things that require them. I use an image control when I only need to display and image, and pretty much nothing else. It's good also because you can load transparent gifs, but it defeats the point of doing it in a picture box in most cases, as it won't show what's behind it.

    Plus you can use the pic box as a control contrain (e.g. put a command button inside the picture box), you can align it and you can add one to MDI forms. I'm sure there's plenty more things I haven't mentioned too.

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