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. Managed C++/CLI
  4. Copied solution will nor recognize application icon

Copied solution will nor recognize application icon

Scheduled Pinned Locked Moved Managed C++/CLI
questioncsharpc++visual-studioannouncement
7 Posts 2 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.
  • B Offline
    B Offline
    BuckBrown
    wrote on last edited by
    #1

    Hi, I'm using Visual Studio 2005 C++/CLI. I guess my previous question on the autoscroll was a real stumper, so I'll try something else. When writing an application I will get quite a ways into the development when, at the insistance of my boss, I need to create a new version that I can continue development on. So I will go through the tedious process of creating a new folder and copying 'mySolution1 Version 1' to 'mySolution1 Version2' and then renaming the individual solution and project files (that isn't why I am posting but if someone knows an easier way to do that I would love to know). On to the question. While working on an app I did this through a 'mySolution1 Version5' at which time I added an icon of our company logo to appear on the forms and everything was good. Then I needed to use a copy of 'mySolution1 Version5 to begin a new and different application called 'mySolution2 Version1' again renaming the solution and project files accordingly. It compiled fine but crashed with a 'MissingManifestResourceException' on the 'Windows Form Designer' generated code "this->Icon = (cli::safe_cast(resources->GetObject(L"$this.Icon")));". If I remark out the line the app compiles and runs fine using the default icon. If I go into the 'Forms Designer' and change the Icon property the way I did before then the app crashes. The syntax of the line is the same. Anyone see what I am doing wrong? Thanks, Buck

    L 1 Reply Last reply
    0
    • B BuckBrown

      Hi, I'm using Visual Studio 2005 C++/CLI. I guess my previous question on the autoscroll was a real stumper, so I'll try something else. When writing an application I will get quite a ways into the development when, at the insistance of my boss, I need to create a new version that I can continue development on. So I will go through the tedious process of creating a new folder and copying 'mySolution1 Version 1' to 'mySolution1 Version2' and then renaming the individual solution and project files (that isn't why I am posting but if someone knows an easier way to do that I would love to know). On to the question. While working on an app I did this through a 'mySolution1 Version5' at which time I added an icon of our company logo to appear on the forms and everything was good. Then I needed to use a copy of 'mySolution1 Version5 to begin a new and different application called 'mySolution2 Version1' again renaming the solution and project files accordingly. It compiled fine but crashed with a 'MissingManifestResourceException' on the 'Windows Form Designer' generated code "this->Icon = (cli::safe_cast(resources->GetObject(L"$this.Icon")));". If I remark out the line the app compiles and runs fine using the default icon. If I go into the 'Forms Designer' and change the Icon property the way I did before then the app crashes. The syntax of the line is the same. Anyone see what I am doing wrong? Thanks, Buck

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      BuckBrown wrote:

      I will get quite a ways into the development when, at the insistance of my boss, I need to create a new version that I can continue development on. So I will go through the tedious process of creating a new folder and copying 'mySolution1 Version 1' to 'mySolution1 Version2' and then renaming the individual solution and project files (that isn't why I am posting but if someone knows an easier way to do that I would love to know).

      :omg::wtf: Umm, ever heard of source control. :doh:

      led mike

      B 1 Reply Last reply
      0
      • L led mike

        BuckBrown wrote:

        I will get quite a ways into the development when, at the insistance of my boss, I need to create a new version that I can continue development on. So I will go through the tedious process of creating a new folder and copying 'mySolution1 Version 1' to 'mySolution1 Version2' and then renaming the individual solution and project files (that isn't why I am posting but if someone knows an easier way to do that I would love to know).

        :omg::wtf: Umm, ever heard of source control. :doh:

        led mike

        B Offline
        B Offline
        BuckBrown
        wrote on last edited by
        #3

        Umm, no.

        L 1 Reply Last reply
        0
        • B BuckBrown

          Umm, no.

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          Revision Control[^]

          led mike

          B 1 Reply Last reply
          0
          • L led mike

            Revision Control[^]

            led mike

            B Offline
            B Offline
            BuckBrown
            wrote on last edited by
            #5

            Hey Mike, Geez, considering I'm the only programmer on staff the Source Control in VS 2005 appears 100 times more tedious than the way I have been doing it. And considering that there is no money to buy a third party plug-in where would I get a free third party plug-in? Buck

            L 1 Reply Last reply
            0
            • B BuckBrown

              Hey Mike, Geez, considering I'm the only programmer on staff the Source Control in VS 2005 appears 100 times more tedious than the way I have been doing it. And considering that there is no money to buy a third party plug-in where would I get a free third party plug-in? Buck

              L Offline
              L Offline
              led mike
              wrote on last edited by
              #6

              BuckBrown wrote:

              Geez, considering I'm the only programmer on staff the Source Control in VS 2005 appears 100 times more tedious than the way I have been doing it.

              Ok, good luck

              led mike

              B 1 Reply Last reply
              0
              • L led mike

                BuckBrown wrote:

                Geez, considering I'm the only programmer on staff the Source Control in VS 2005 appears 100 times more tedious than the way I have been doing it.

                Ok, good luck

                led mike

                B Offline
                B Offline
                BuckBrown
                wrote on last edited by
                #7

                Just to let you know, I have figured out a seven step process that I can use to consistantly be able to copy and rename entire solutions but that isn't what I need to do to correct this icon problem that give me an error on the line... this->Icon = (cli::safe_cast(resources->GetObject(L"$this.Icon"))); There was a Microsoft .NET article "http://msdn.microsoft.com/en-us/library/ms950960.aspx" talking about this very subject and another forum had a solution for this problem. The solution is to add the icon as a resource and then select the incon file's Build Action property and change it to Embedded. My problem now (as it always is with Microsoft) is that my VS 2005 does not have the same Forms or properties as these examples and the icon file I imported does not have a Build Action property. I will post again as a Build Action problem. Sorry, it would have been nice to provide you with a link to the MS article but I don't know how to do that. Thanks

                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