I'm having trouble with my application icon looking bad after adding it into my project, building it, and creating a shortcut to it.
Here's what I've done:
1) I started with a 256x256 PNG file that looks great.
2) I used IcoFX to generate a .ICO file with all the recommended sizes.
3) I add the icon to my project as follows:
A) Open project properties -> Resources -> Add Resource -> Add Existing File
B) Choose the .ICO file that I created in step 2.
4) Go to "Application" section of project properties.
5) In "Icon and Manifest", drop down "Icon" and choose the icon that I added in step 3.
6) Save my project and build it.
7) Go to Windows Explorer and find the newly built EXE.
8) Create a shortcut to the EXE on the desktop.
The icon looks like this:
As you can see, it doesn't look very good. The edges are jagged, etc.
At first, I thought it was an issue with my .ICO file, but here's the kicker... I then did the following:
9) Right-click on the desktop icon, and go to Properties.
10) Go to the Shortcut tab and click "Change Icon".
11) Click "Browse", and select the EXACT SAME ICON FILE that I added to my project in step 3.
Now, my desktop icon looks like this:
Now, the icon looks pretty and smooth!
Again, both icons used the exact same source .ICO file. The only difference is that the first one was imported into Visual Studio and embedded in my .EXE, and the other one was directly used via the OS.
What is Visual Studio doing to my icon to make it look so crummy, and how can I prevent it?
This could be a problem with the windows icon cache. I had the same problem that I fixed by clearing the cache.
The first version of your code that you copied to the desktop - did this have a low res icon ?
Windows will cache the icon when it first sees the EXE, and then does not refresh even when you rebuild your executable if it has the same filename. You will also see the same behavior in windows explorer.
I think by changing the icon through the OS, you've just manually refreshed the icon cache.
You can quickly test this by renaming the EXE before copying it to the desktop. This will bypass the cache and show the actual icon in your EXE.
To get rid of any old icons in the icon cache, you can clear it as described in this link
http://www.winability.com/how-to-erase-icon-thumbnail-cache-windows-8/
Related
How to change the default icon of my Processing appIconTest.exe exported
application in windows ?
The default one :
After some research, the easiest solution i could find is :
Go into ...\processing-3.0.1-windows64\processing-3.0.1\modes\java\application
Save sketch.ico somewhere you can find (renaming it will help).
Place the icon you want to use in the same folder with the same name sketch.ico (which you might create using GIMP).
Now you can export your application from Processing.
Important : Be sure to save the default icon, because every application you export (after changing the icon) using Processing, will have this new icon.
You can change the icon of your running application (the icon that shows up in the title bar of the window and the task bar), but I don't think that's what you're asking about. You can't easily change the icon of the file itself.
That icon seems to be coming from the core.jar Processing library file, so if you want to hack at it, you could try replacing that file in the jar. I really don't recommend that though.
Because the .exe file that Processing exports isn't really an executable anyway- it's really just a shell that calls the code in the lib directory. (source)
If you want to create a real .exe file and have control over its icon, you should look into using a .exe generator like JSmooth or launch4j or JWrapper.
I would recommend Resource Hacker to change the icon of your programs.
Install Resource Hacker (latest build).
Go to your executable file.
Open it with Resource Hacker (right mouseclick, and there should be an option to do that or else you could just click open with).
It will open and show some directories, also one called "Icon", open that one, and right click one one of the icon files (stars with some numbers after that), there will be an option: "replace icon ... Ctrl + R", click that one and replace your icon.
I built a game, and I wanted to change the icon (this is a windows game.) I tried removing the Game.ico that it came with and put in another , but now it just showed the standard exe file icon. All help would be appreciated.
When changing the .ico file, right-click on your project in Visual Studio and go to Properties. Select "Application" form the list on the left. In the "Resources" section browse to the icon file that you wish to use for your game.
Note that the .ico file is only used by XNA on Windows game projects and is ignored for Xbox 360 and Windows Phone 7 games. Also note that it's often easier to edit the existing Game.ico file and make your changes to that file when possible (easier because it's already linked and is in the correct format).
I'm having an issue with an creating application shortcut on the desktop from a Visual Studio 2010 deployment project. The shortcut is created just fine, but when I go to drag and drop an application-specific file onto the shortcut, it doesn't work (the cursor turns into the red circle with a slash through it). On the other hand, if I go to the application directory and do this on the executable itself it works fine (it opens the file properly). The interesting part is if I manually create a shortcut to the executable after install, it also works to drag and drop files onto that.
Something that might be useful that I discovered when I was trying to fix this is that if I open up the properties dialog of both the shortcuts (the deployment project created one and the one I made manually), the manually created one has as its target the full path of the executable, whereas the other one just has the name of the executable (although its start in directory is correct). They both run the application when I double-click on them and they both have the correct icon displayed.
How do I get the deployment project created shortcut to allow drag and drop of executable files onto it to open them?
I had the same issue.
First i went here, which answers your question:
http://social.msdn.microsoft.com/Forums/en/vssetup/thread/b57f1d84-9b0c-4c29-b140-0555f92ffed8
But apparently support for orca.exe and WiRunSQL.vbs seems to have disappeared because I couldn't find it on msdn anywhere.
Then i found http://www.instedit.com which seems to have done the trick. I liked the automated answer of the vbs script, but oh well.
I am working on a visual studio setup project. I want the setup project to install the executable for a windows forms project, and then put a link to that executable in the Programs Menu on the target machine. In the Setup Project I clicked 'Add'-> Project Output... and selected the Primary Output from my WindowsForms App. So that should install the program right? Ok, so next I went to the File System on the Target Machine, right clicked on the Primary output from WindowsForms App and said Create Shortcut. I then moved that shortcut into the User's Programs Menu folder.
I tried running the installer and it works ok but for some reason whenever I click shortcut that is in the Programs Menu It actually installs the program before running it every time. Why does it do this? Did I add a shortcut to the wrong thing? If I navigate to the directory application directory and click the .exe file it just opens the program without doing any install. Does anyone know what is going on?
I read somewhere that I could actually make a shortcut in windows explorer that targets my output .exe and then add that file to the installer project but I can't see how that would work on every machine it gets installed on.
I think this is how I did it... been a while tho.
Application Folder
Primary Output From MyProjectName (Active)
Right-Click => Create Shortcut
Then
Users Program Menu
Right Click => Add Folder
Go back to "Application Folder"
Move the shortcut over to the program menu
Rename it to whatever you need. The "Type" should say "shortcut"
Is that kinda what it looks like for you right now? Something in
* User's Program Files
* My App Folder
* Start My Application (shortcut)
And need I say, MS's install projects are a nightmare :) Just open the .VDproj and look. I never thought i'd say I like the csproj xml format, but in comparison...
The problem was not actually in how I was creating my shortcut but rather what the shortcut was pointing too. The executable that the shortcut was targeting was not in the main installation folder and for some reason it didn't like that. Restructuring the install directories a bit fixed it.
I created a setup file. It is working fine, but I want an image for my setup. When I installed the setup in any system I want some images on my setup. Help me, thank u.
I will tell you how to do it in Visual Studio. To change the setup.exe icon you can do the following:
Build your setup project
Open the setup.exe file use just build, File -> Open -> File
Right click the Icon node in the file explorer window and choose the Add Resource
Import the icon your want in the popup dialog, and make sure the ID of the icon is the smallest one.