Results 1 to 8 of 8

Thread: PictureBox V/s ImageBox

  1. #1

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    PictureBox V/s ImageBox

    Hi all!!

    can somebody plz explain difference btw the 2.

    thnx

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: PictureBox V/s ImageBox

    "The image control uses fewer system resources and repaints faster than a picture box control, but it supports only a subset of the picture box properties, events, and methods."

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: PictureBox V/s ImageBox

    Also the picture box has an hWnd property (handle) and the Image control does not.

  4. #4
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: PictureBox V/s ImageBox

    Picture box is a heavy control while Image control is a light control.
    Picture boxes can contain almost anything. They can act as containers and also draw/print anything in it, besides holdong images(pictures). The Image control on the other hand is specifically meant for holding images. They can't act as containers.

    So If you just want to hold images, consider the image control. If you want to draw something in it or hold other controls, consider the picturebox control.

    Pradeep
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  5. #5
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: PictureBox V/s ImageBox

    A Picturebox is pretty much a window within a window. It can hold controls, like a window. It can be drawn on like a window. It has its hWnd and hDC handles for graphics.

    An Imagebox on the other hand is limited and not like a Picturebox at all. All it can do is have an image loaded, and has stretching capabilities. It cannot be drawn on, hold controls, or anything.

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: PictureBox V/s ImageBox

    You can also stretch an Image Control

  7. #7
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: PictureBox V/s ImageBox

    I just said that in post #5

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: PictureBox V/s ImageBox

    Oops. Thought you were saying that it didn't stretch.

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