Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Create an Icon for Visual Studio with just MSPaint and Visual Studio

Tags:

I have been reading a lot of posts about creating icons and then assigning one of those icons in Visual Studio Project --> Properties --> Icon and Manifest. When I do this, I get a message that the icon is not valid. The primary way I have been doing this is using MSPaint.

This is when I save a 24-bit icon in MSPaint, which is mentioned in one of the posts I read. I cannot find any editing ability in the image editor of Visual Studio 2012. So, how does one create a simple icon for an application?

I know there are free converters out there. I am asking specifically if there is a way to convert using existing tools like Visual Studio, MSPaint, and so on.

like image 806
octopusgrabbus Avatar asked Dec 02 '16 13:12

octopusgrabbus


People also ask

Can you make icons with paint 3D?

Click the Zoom (+) button to expand the small canvas. Then select the Brushes tab to access and utilize Paint 3D's drawing tools with which to design your icon. You can also create your icon by adding shapes or stickers to the canvas from the 2D Shapes, 3D Shapes, and Stickers tabs.


2 Answers

Creating an icon in MSPaint works just fine. Here's how you should proceed to get it to work.

In Visual Studio

  • Open Resources.resx from Solution Explorer (it's in the Properties folder)

  • Choose Icons from DropDown Menu on the left [Ctrl+3]

  • Choose Add New Icon from the DropDown Menu Add Resource

  • Enter a name for the Icon Resource file

  • Right click on all the icons in the left panel - one at a time - and choose Delete Image Type (The last icon cannot be deleted - Leave it for now)

enter image description here

In MSPaint or an image program of your choise (I prefer Microsoft Paint 3D)

  • Create/Open the image that you would like to use (It could be a screenshot of your program)

  • Resize the image to 256x256 pixels

  • Select the full image [Ctrl+A] and then copy the image [Ctrl+C]

In Visual Studio

  • Right click in the left panel (the icon panel) and choose New Image Type... [Ins]

  • Choose Target Image Type 256x256, 24 bit

  • (Select the New Target Type and) Paste [Ctrl+V] the image you copied from your image program

In your image program and in Visual Studio

  • Repeat the above Image Copy (image program) and Target Paste (Visual Studio) process for the 24 bit icon size's 128x128, 64x64, 32x32 and 16x16 (and/or the ones you like to support)

  • Don't forget to delete the last icon you couldn't delete before

enter image description here

In Visual Studio

  • Save the icon file (.ico) (by closing its tab or using [Ctrl+S])

  • Add the icon to your forms

  • Right click your project file in the Solution Explorer and choose Properties
    (You'll also find it in the Visual Studio Menu Debug -> "Your Project Name" Properties...)

  • Choose the Application section

  • Under Resources - Icon and manifest browse to and select the icon file you just created.

All set...

(Tested with Visual Studio 2017 & Visual Studio Enterprise 2019)

like image 160
Ola Ström Avatar answered Oct 13 '22 16:10

Ola Ström


In this day and age, it's way easier and faster to just use https://icoconvert.com/

  1. Upload your image file (PNG, GIF, JPG, etc.)
  2. Select ICO for Windows 7, Windows 8, Vista and XP
  3. Download the ICO file

The ICO file will contain various resolutions of your original image.

like image 20
bouvierr Avatar answered Oct 13 '22 18:10

bouvierr