Resource File Editor

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shadowboxer

    #1

    Resource File Editor

    How do I add an Icon or bmp or jpg to a resource file?

    there doesnt appear to be a clear way to do so in the IDE....

    thanks -J


  • Cor

    #2
    Re: Resource File Editor

    Hi Shadowboxer
    [color=blue]
    > How do I add an Icon or bmp or jpg to a resource file?
    > there doesnt appear to be a clear way to do so in the IDE....[/color]

    Did you look to ImageList?
    Cor


    Comment

    • Martin Robins

      #3
      Re: Resource File Editor

      Add the image fie to your project and then in the item properties set the
      Build Action to EmbeddedResourc e

      "Shadowboxe r" <shadowboxer@ma c.com> wrote in message
      news:OqidnbeZxJ 2_HOiiU-KYgw@giganews.c om...[color=blue]
      > How do I add an Icon or bmp or jpg to a resource file?
      >
      > there doesnt appear to be a clear way to do so in the IDE....
      >
      > thanks -J
      >
      >[/color]


      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Resource File Editor

        "Shadowboxe r" <shadowboxer@ma c.com> schrieb:[color=blue]
        > How do I add an Icon or bmp or jpg to a resource file?
        >
        > there doesnt appear to be a clear way to do so in the IDE....[/color]

        Add the icon file to your project and set its 'Build Action' property to
        'Embedded Resource'. You can use the code below to load the icon at
        runtime:

        \\\
        foo.Icon = _
        New Icon( _
        [Assembly].GetExecutingAs sembly().GetMan ifestResourceSt ream( _
        "WindowsApplica tion1.Ball.ico" _
        ) _
        )
        ///

        'WindowsApplica tion1' is the root namespace of the application, "Ball.ico"
        is the icon's filename.

        --
        Herfried K. Wagner
        MVP ยท VB Classic, VB.NET
        <http://www.mvps.org/dotnet>


        Comment

        Working...