Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Runtime Error in Treeview Imagelist

Runtime Error in Treeview Imagelist

Scheduled Pinned Locked Moved C#
helphardwarequestionannouncementlearning
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vlusardi
    wrote on last edited by
    #1

    I Get the Following error inside the "Windows form designer generated code" section for the imagelist that I've set up for a treeview: An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll Additional information: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "ServerComboBoxForm.resources" was correctly embedded or linked into assembly "ServerComboBox_Test". baseName: ServerComboBoxForm locationInfo: NetworkManagement.Demo.ServerComboBoxForm resource file name: ServerComboBoxForm.resources assembly: ServerComboBox_Test, Version=1.0.1140.19047, Culture=neutral, PublicKeyToken=null Error occurs on this line of the InitializeComponent method: this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer) (resources.GetObject("imageList1.ImageStream"))); Can anyone tell me what the problem might be? thanks. .

    J F 2 Replies Last reply
    0
    • V vlusardi

      I Get the Following error inside the "Windows form designer generated code" section for the imagelist that I've set up for a treeview: An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll Additional information: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "ServerComboBoxForm.resources" was correctly embedded or linked into assembly "ServerComboBox_Test". baseName: ServerComboBoxForm locationInfo: NetworkManagement.Demo.ServerComboBoxForm resource file name: ServerComboBoxForm.resources assembly: ServerComboBox_Test, Version=1.0.1140.19047, Culture=neutral, PublicKeyToken=null Error occurs on this line of the InitializeComponent method: this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer) (resources.GetObject("imageList1.ImageStream"))); Can anyone tell me what the problem might be? thanks. .

      J Offline
      J Offline
      John Mautari
      wrote on last edited by
      #2

      If you're using a manifest file to make Visual Studio .NET display the XP visual styles, you'll need to create a manifest file for your application too. I got this non-sense error message some days ago, and learned that if you use a manifest file in VS.NET, then build a project, you'll need a manifest file to run the application... :omg: Hope it helps. John

      V 1 Reply Last reply
      0
      • J John Mautari

        If you're using a manifest file to make Visual Studio .NET display the XP visual styles, you'll need to create a manifest file for your application too. I got this non-sense error message some days ago, and learned that if you use a manifest file in VS.NET, then build a project, you'll need a manifest file to run the application... :omg: Hope it helps. John

        V Offline
        V Offline
        vlusardi
        wrote on last edited by
        #3

        John, thank for the reply... not sure if I'm using a manifest file or not, how do I tell..??? I can add image lists to similar projects without a problem... I find it strange that the error occurs in Windows generated code... How do I go about creating a manifest file?

        1 Reply Last reply
        0
        • V vlusardi

          I Get the Following error inside the "Windows form designer generated code" section for the imagelist that I've set up for a treeview: An unhandled exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll Additional information: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "ServerComboBoxForm.resources" was correctly embedded or linked into assembly "ServerComboBox_Test". baseName: ServerComboBoxForm locationInfo: NetworkManagement.Demo.ServerComboBoxForm resource file name: ServerComboBoxForm.resources assembly: ServerComboBox_Test, Version=1.0.1140.19047, Culture=neutral, PublicKeyToken=null Error occurs on this line of the InitializeComponent method: this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer) (resources.GetObject("imageList1.ImageStream"))); Can anyone tell me what the problem might be? thanks. .

          F Offline
          F Offline
          Furty
          wrote on last edited by
          #4

          I have had this same problem with VS.NET many, many times - for me it happens when I add my own class *before* a VS.Net generated class; e.g. You derive from the TreeView, but add your own TreeViewItem class in the same code page before the TreeView code. The workaround is to keep the VS.Net class as the first class. Don't know if this is the same problem you're having, but the symptoms are certainly the same.

          V 1 Reply Last reply
          0
          • F Furty

            I have had this same problem with VS.NET many, many times - for me it happens when I add my own class *before* a VS.Net generated class; e.g. You derive from the TreeView, but add your own TreeViewItem class in the same code page before the TreeView code. The workaround is to keep the VS.Net class as the first class. Don't know if this is the same problem you're having, but the symptoms are certainly the same.

            V Offline
            V Offline
            vlusardi
            wrote on last edited by
            #5

            Furty, thanks for the reply... this doesn't seem to be the case for me... the "code page" as you call it, contains only the form class definition, and everything is generated by Windows... the subclased treeview class lives in a different sourcefile, and is only referred to when I instantiate a new treeview item in the form class... any more suggestions are welcome

            D 1 Reply Last reply
            0
            • V vlusardi

              Furty, thanks for the reply... this doesn't seem to be the case for me... the "code page" as you call it, contains only the form class definition, and everything is generated by Windows... the subclased treeview class lives in a different sourcefile, and is only referred to when I instantiate a new treeview item in the form class... any more suggestions are welcome

              D Offline
              D Offline
              dazinith
              wrote on last edited by
              #6

              ever figure this one out? im getting the same issue with an imagelist for a toolbar.. dont the problem until i add an image to the imagelist.. exact same error.. still a newb.. cut me some slack :P -dz

              V 1 Reply Last reply
              0
              • D dazinith

                ever figure this one out? im getting the same issue with an imagelist for a toolbar.. dont the problem until i add an image to the imagelist.. exact same error.. still a newb.. cut me some slack :P -dz

                V Offline
                V Offline
                vlusardi
                wrote on last edited by
                #7

                Look at the reply from "furty" above, this was my problem... I had declared something before the windows generated class, and the problem went away when I moved it further down in the source file... hope this helps...

                D 1 Reply Last reply
                0
                • V vlusardi

                  Look at the reply from "furty" above, this was my problem... I had declared something before the windows generated class, and the problem went away when I moved it further down in the source file... hope this helps...

                  D Offline
                  D Offline
                  dazinith
                  wrote on last edited by
                  #8

                  i ended up just making another form and using it.. as for saying you 'had declared something before..' do you mean where you declare your variables at the top of the class (where it generates all the textbox variables, etc.) or do you mean in the initializecomponent() section? thanks! hopefully i wont run into this problem again.. still a newb.. cut me some slack :P -dz

                  V 1 Reply Last reply
                  0
                  • D dazinith

                    i ended up just making another form and using it.. as for saying you 'had declared something before..' do you mean where you declare your variables at the top of the class (where it generates all the textbox variables, etc.) or do you mean in the initializecomponent() section? thanks! hopefully i wont run into this problem again.. still a newb.. cut me some slack :P -dz

                    V Offline
                    V Offline
                    vlusardi
                    wrote on last edited by
                    #9

                    yes, I had added some declarations between the namespace declaration and the windows-generated form class declaration... once I moved those out, the problem went away...

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups