CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2011
    Posts
    3

    I need help badly ...

    im working on my project ....
    a project which includes controls like combo box , check box , list box , etc
    using these controls how could i put up pictures ... like this

    help me pls
    Attached Images Attached Images  

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: I need help badly ...

    Drag an Image Control, or else PictureBox. You can also place a background image anywhere you have a control or form.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jan 2011
    Posts
    3

    Re: I need help badly ...

    i did make a picture box ... see my attached files ....

  4. #4
    Join Date
    Jan 2011
    Posts
    3

    Re: I need help badly ...

    will i use DIM ? on this code ?

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: I need help badly ...

    To add pictures to the picture boxes you would use the loadpicture method of the picture box control.
    Code:
    Picture1.LoadPicture(FileName)
    To link these to combos, options, lists or whatever would require either the full path/filename in the combo, list or whatever or some code written to assign the selected item a filename which would then be passed to the loadpicture method of the picture box.
    Always use [code][/code] tags when posting code.

  6. #6
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: I need help badly ...

    Another help would be the ImageList control which allows to store images in the form without having to load them.
    Go to Project->Components and add 'Microsoft common Controls 6.0' to your toolbox. It contains the ImageList control (and also an image combo).
    The ImageList allows you to load and store some images at design time.
    To make an image show up in a picturebox or image control you simply assign it like:
    Picture1.Picture = ImageList1.ListImages(PicNumber).Picture
    where PicNumber can be derived from the RadioButton or ComboBox index you have selected.

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