Results 1 to 8 of 8

Thread: Picture box v/s image control

  1. #1

    Thread Starter
    Addicted Member samkud's Avatar
    Join Date
    Oct 2001
    Location
    India
    Posts
    171

    Picture box v/s image control

    What are the differences between the picture box and the image control?

    Regards

    samir

  2. #2
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Talking Muppets are attacking the molehills...STOP THEM!

    One major difference is that the Picture Box is a container, and can hold other control inside it, an image control can't.

    An image control is transparent.
    An image control can autonmatically resize it's self to fit the picture.

    Why?

  3. #3
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Picture Box is one of the few controls that can be put onto an MDI form. Also it is a container by itself, meaning you can put other controls onto a picturebox, just like you would on a frame or on a form.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    PictureBox also has a .hDc property which means that you can BitBlt and StretclBlt to it.
    It also uses up far more resources than an imagebox.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  5. #5
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    An image control is a lightweight control.
    This means that it is not really a control in that it does not have a window of its own but rather is drawn by the container whenever that container is redrawn.

    This means that an image control does not have a window handles so no API calls that rerquire a window handle can use it.

    Moreover since it is drawn by the container it cannot be places in front of any child controls of that container and the .ZOrder is not relevant to it.

    HTH,
    Duncan
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  6. #6
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Originally posted by MerrionComputin
    An image control is a lightweight control.
    This means that it is not really a control in that it does not have a window of its own but rather is drawn by the container whenever that container is redrawn.

    This means that an image control does not have a window handles so no API calls that rerquire a window handle can use it.

    Moreover since it is drawn by the container it cannot be places in front of any child controls of that container and the .ZOrder is not relevant to it.

    HTH,
    Duncan
    Found a gearbox yet ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  7. #7
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Found a gearbox yet?
    Ordered a magnificently expensive one from Rimmer Bros....also EventVB release G is in system test so be prepared fro even more gratuitous mentions of it when the release date swings around....

    This should probably get relegated to ChitChat?
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  8. #8
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Nah I'd give it another good 10 or 15 off-topic posts before that happens
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

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