Results 1 to 2 of 2

Thread: Image List

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Image List

    Hey,

    I have a class where I inherit from the DataGrid.
    I want to create this as this will be used in few places in my app and I don't feel like copying and pasting a lot of code in many places. (and maintaining it...).
    I am creating an Imagelist control that will hold hte icons for a context menu.
    Now, I don't want to distribute the icons so I want to embed them into my app.

    How can I go about it?
    How do I use a resource file in vb.net?

    Thanks a lot,
    Don't anthropomorphize computers -- they hate it

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Image List

    If you create an ImageList in the designer, i.e. add it to a form, then whatever images you add to it there will be embedded in your exe. You could then assign the ImageList to a global variable and access it from anywhere in the app. The alternative would be to add the image files to your project and set their Build Action property to Embedded Resource. You could then create Image objects at run time from the resources and add them to an ImageList.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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