Click here to Skip to main content
15,888,351 members
Everything / Icon

Icon

icon

Great Reads

by Ordiales
When no XP support is necessary. Better Icon structure arrises and easy conversion is allowed.
by dynamichael
Build an oct-tree from a color palette for a fast nearest color search
by Andy Point
Android Alert Dialog Tutorial : Working with Time Picker, Date Picker and List Dialogs In this tutorial we will discuss how to use dialogs and alerts in Android Apps. A Dialog is a small popup shown to the user to get some additional information from the user or ask him to make some decision. Alert
by Steffen Ploetz
Step-by-step instructions and source code snippets for inserting a bitmap (or a section of it) into an icon image.

Latest Articles

by Steffen Ploetz
Step-by-step instructions and source code snippets for inserting a bitmap (or a section of it) into an icon image.
by Steffen Ploetz
How to embed icons into Win32 programs without utilizing resources - useful for platforms without resource editor/resorce compiler, e.g., ReactOS. Learn the missing things about the .ico format.
by dynamichael
Build an oct-tree from a color palette for a fast nearest color search
by Herbert Lausmann
An IconBitmapEncoder that produces high-quality icons, written in VB.NET and C#, WPF

All Articles

Sort by Updated

Icon 

14 Mar 2023 by Yount_0701
I'm writing a program which need to load icon resource from memory, there seems no direct windows API can do this work. the icon file was transmit by network, my program receives the data of the file, and store this data in my program buffer, I...
14 Mar 2023 by Rick York
I realize that you wrote you don't want to save the data to a file but I think that would be the easiest way to do it. Maybe looking at how an image handling library does it will help you. Here's one that I use all the time and it handles icon...
13 Mar 2023 by CPallini
I am afraid it won't be an easy task. You might have a look at this article: Icons | Microsoft Learn[^].
2 Jul 2022 by Duran Duran Duran
I downloaded this free icon from fontawesome.com and it's static, it doesn't want to move, how can I fix this? HTML What I have...
2 Jul 2022 by Luc Pattyn
Quote: Why is this icon not moving? i { text-align: center; } Maybe icons don't obey text commands... Have a look here: CSS: centering things[^] :)
2 Feb 2022 by shiva_yn
I designed a WPF application, its add a tray icon in task bar. whenever system startup, the icon shows notification. its working correctly. I create the setup file, using windows standard installer. in setup, I added my exe in application...
1 Jan 2022 by Nicke Manarin
As a hack, you can try drawing with DrawIconEx, increasing the cursor step until it returns false. The step prior to the failed attempt is the maximum number of frames of the cursor.
8 Jul 2021 by Chinedum Ezeozue
I'm done with almost every other setup for my app, now I've been trying for hours to figure out how I can display weather icons for my app according to its city's response but I still have no idea how to do that. I've searched several sites for...
15 Jun 2021 by Maciej Los
Follow these steps: Visual Studio Feedback[^]
9 Jun 2021 by shiva_yn
iam create a tray NotifyIcon application using Hardcodet.Wpf.TaskbarNotification. Its running perfectly in debug time. after create the setup for that application, it is Installed successfully completed. Now screen not show the tray...
7 Jun 2021 by Richard Deeming
The icon is most likely hidden in the "overflow" menu. Customize the taskbar notification area[^] The end user will need to change their settings to show your icon. You cannot do that via code or the setup, because it's up to the user to decide...
18 May 2021 by Maximilien
I have a simple C# application (.net 4.7.2 windows application) I/we need to create 3 versions of this application each with its own application icon. MyApp.exe -> a.ico MyApp.exe -> b.ico MyApp.exe -> c.ico I know how to add the icon for one...
18 May 2021 by DebugST
Window icon or application icon? If you want to switch between different window icons according to different versions, you can add all the icons to the resources of the project. if(/*add your code*/){ this.Icon = Properties.Resources.a_ico...
18 May 2021 by Member 12699051
Hello, Why not add an argument when starting (a, or c) the application and handle the argument in application initialization.
18 May 2021 by RickZeeland
A simple way would be to use a batch file that replaces the icon and builds the application three times. You can also load another icon for a form at startup, but this does not change the application icon that you see in explorer.
18 May 2021 by OriginalGriff
Set it at runtime, when you decide "which instance" this run is: public MyForm() { InitializeComponent(); using (FileStream fs = File.OpenRead("App3.ico")) { Icon = new Icon(fs); } }
24 Feb 2021 by wcb2@cornell.edu
I have a Windows 7 application where I need to change the icon displayed on the main form and the icon that is displayed by Windows on the taskbar at runtime. In code I am simply changing the Form.Icon property and this works no problem if I run the app from the EXE. The icon changes in...
24 Feb 2021 by Member 15082031
I am having the exact same issue but I never realized that it was happening because of a "Shortcut". I noticed this behavior when I would pin my application to the windows 10 task bar. If I don't pin the application, I can simply change the...
2 Feb 2021 by QUEEN LISA Her Insta: lalalalisa_m
Hello everyone ! I have no idea about coding but I searched on google a lot but I still don't manage to get it done like I want. I want to create a table with colorful icons ( Twitter, phone, headphones), they should also have some animations...
2 Feb 2021 by OriginalGriff
This is going to probably sound a but brutal, but ... it isn't, not really. Quote: I have no idea about coding That's the problem. Quote: I searched on google a lot That's not the solution. Quote: I still don't manage to get it done like I want...
2 Feb 2021 by Richard MacCutchan
You may find that Support – Official WordPress.com Customer Support[^] will get you an answer.
27 Dec 2020 by Steffen Ploetz
Step-by-step instructions and source code snippets for inserting a bitmap (or a section of it) into an icon image.
2 Jul 2020 by Member 14621376
Application won't show you taskbar in runtime until you have any shortcuts to it. If you get rid of all shortcuts and run from Runtime folder, it will work fine... But this is not what we need. nobody anywhere didn't provide for solution what......
22 Jun 2020 by Choroid
Well this is a kick in the pants A 7 year old post on SO [^] Link to SO Code I used Public Sub SetIcon() InitializeComponent() Icon = Icon.ExtractAssociatedIcon(System.Reflection.Assembly.GetExecutingAssembly().Location) ...
22 Jun 2020 by Choroid
I am using Visual Studio 2019 v 16.6.2 with Frame Work 4.7.2 on a Windows 7 64 bit machine I am coding in visual basic NOT C# Icon is 32X32 with 32 bit depth created with GreenFish icon maker I know how to set the icon for a form using the...
22 Jun 2020 by Richard MacCutchan
I just tried the same thing and it failed as you say. However, I then double clicked the form and changed the icon in the form properties, and it showed the correct icon. As to your second question, all resources that are used in building the...
22 Jun 2020 by Luc Pattyn
Hi, a Form has an Icon property, defining which icon may be shown at the lefthand side of a Form's title bar. an application has it's own icon, which you can specify through the project's property page; right-click the project in Solution...
27 Nov 2019 by Johnny J.
Hi all I'm doing (yet another) Instagram application, and I need to get hold of a set of nice, simple and stylistic icons. Only thing is that I need to get them as single files with these requirements: * PNG format * Transparent background * Preferably 32x32 pixels You may ask: Why don't you...
21 Oct 2019 by Steffen Ploetz
How to embed icons into Win32 programs without utilizing resources - useful for platforms without resource editor/resorce compiler, e.g., ReactOS. Learn the missing things about the .ico format.
25 May 2019 by dynamichael
Build an oct-tree from a color palette for a fast nearest color search
22 Feb 2019 by Richard MacCutchan
See Solution 1 in Sound on/off menu tool strip images[^].
22 Jan 2019 by Michael Haephrati
I am posting an answer because after some research I found a way. Using my method, an icon can be used as an integral part of a static library and such library can be used by any type of application, including a console one (which doesn't have any resource segment whatsoever). 1. Icon is...
18 Nov 2018 by Member 14056208
@CHill60 thanks for the reply. I tried If [%1] == [] goto :eof ECHO [.ShellClassInfo] >%1\desktop.in ECHO IconResource=C:\icon.ico,0 >>%1\desktop.in move %1\desktop.in %1\desktop.ini attrib +S +H %1\desktop.ini attrib +R %1 but may question is this if I may, in the code the location of icon...
18 Nov 2018 by XTAL256
Hello, I have some code that uses GDI+ to convert an icon to grayscale*. However, when transparency (i.e. alpha channel) is involved, the resulting icon seems to use pre-multiplied alpha - rather than normal alpha - making the transparent pixels look darker. * Create GDI+ Bitmap from HICON,...
16 Nov 2018 by Member 14056208
I have a little collection of movies placed in folders. I placed movie poster in each folder, and recently, I placed an icon (converted from that poster thru a software) in each folder, and i want that each folder will look from the icon placed in each of them. Is there a .bat file, or any...
28 Aug 2018 by Richard Deeming
You can't. If you could, it would be trivial for malicious sites to trick users into thinking that the dialog was a system-level message. Also, showModalDialog was removed from Chrome in 2014[^], and from Firefox in 2017[^]. It's deprecated in IE11, and not supported in Microsoft Edge. There...
28 Aug 2018 by Leonardo Hernández
By JS I'm open a modal popup, But i need to change the IE icon to this page. How I can do that. What I have tried: I'm opening the pages this way. window.showModalDialog("../AccessStudyTemplate/AccessStudyTemplate.html?id_gdm_study_index=" + id_gdm_study_index + ';isArea=' + area, "",...
11 Jul 2018 by Member 13857021
Hello, I am in search for how to add icons to the notifyicon contextmenu items. The notifyicon and contextmenu and menuitems all are added from the backend code only and not from the drag and drop. Kindly help. Thank you. What I have tried: Nothing to check. I have Googled. NOthing found.
11 Jul 2018 by CHill60
I believe you have to draw the menu yourself. There is an article here on CodeProject that gives a detailed example that could be adapted - Working with OwnerDraw Menus in VB.NET[^]
25 Apr 2018 by User 7429338
Only executables have an icon, DLL's don't support this.
25 Apr 2018 by Frederic GIRARDIN
is there a way to set .NET Dll icon ? Project panel do not allow this field. i don't know if assembly can do this... What I have tried: i search on for 1hour on the web.
22 Mar 2018 by Member 12561559
I have a datable that I have populated with data from SQL server and a datagridview that is bound to that data. Due to several queries that take some time to populate various columns in the datatable, cellformatting then picks those up and displays an icon for the resulting column (about 8...
11 Nov 2017 by Herbert Lausmann
An IconBitmapEncoder that produces high-quality icons, written in VB.NET and C#, WPF
6 Nov 2017 by Member 13503586
I'm learning to use DEV-C++ 5.11, hoping to make a program I have in mind. Before I go any further, I would like to change the icon for the resulting program, but it doesn't seem to work. Here's what I did: 1 - I start a new project (File - New - Project - Windows Application) and name it...
6 Nov 2017 by Member 13503586
I finally figured it out! I replaced the following two lines wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); /* Load a standard icon */ wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); /* use the name "A" to use the project icon */ with wc.hIcon = LoadIcon(hInstance, "A"); wc.hIconSm =...
6 Nov 2017 by Jochen Arndt
Within your created WinMain function the application main window is usually registered calling RegisterClassEx: WNDCLASSEX wc; // ... wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); RegisterClassEx(&wc); HWND hwnd = CreateWindowEx(...); IDI_APPLICATION is the resource ID of an icon contained in...
31 Mar 2017 by Michael Haephrati
Is there a way to embed resources (such as icons, dialogs) in a c++ (Win32 API) static library?My purpose is to embed an icon in the static library in a way that functions that use LoadIcon will work as if it was a normal .exe so the main application can only link to the static library and...
30 Mar 2017 by Jochen Arndt
You might have a look at this SO thread: visual c++ - VC++ resources in a static library - Stack Overflow[^].Especially the second solution looks interesting (I have never done such so far). That solution is also referenced at Linking resources from a static library | Tech Leaves[^].
31 Jul 2016 by Hein Pauwelyn
How you could use icons in your application there are 2 possible ways: images and icon font (Font Awesome).
18 Jul 2016 by Andy Point
Android Alert Dialog Tutorial : Working with Time Picker, Date Picker and List Dialogs In this tutorial we will discuss how to use dialogs and alerts in Android Apps. A Dialog is a small popup shown to the user to get some additional information from the user or ask him to make some decision. Alert
30 Jun 2016 by Private Dobbs
This is a B2B app, part of a larger solution which includes a back-end server. Let's say a company purchases this solution, get's it's employees to download the app and they then connect to the company's server. The company server as part of it's response/configuration data sends back the...
4 Apr 2016 by VR Karthikeyan
Vector icons in WPF
28 Aug 2015 by InvisibleMedia
Defining innovation beyond the limits of Chomsky
4 Aug 2015 by dmihailescu
A windows explorer extension for easy binary/text file comparisons and calculating the MD5, SHA1, SHA256 hashes.
11 Jun 2015 by Lance Contreras
Create an easily resusable IconBlock (TextBlock that display's an icon)
8 Mar 2015 by Jochen Arndt
I'm often using icons from the Open Icon Library[^]. They are organized into groups, have descriptive names, and can be previewed using the Windows explorer.There are also special download packages for the three main licenses Public Domain, GPL, and Creative Commons.GPL icons require...
7 Mar 2015 by Peter Leow
Refer: Microsoft Azure, Cloud and Enterprise Symbol / Icon Set for Visio, PowerPoint, PNG[^]
7 Mar 2015 by Afzaal Ahmad Zeeshan
Yes, you can find icons made from third-party designers, and then add them to your project having WPF framework. For example, from this answer you can use already built icons from Microsoft if you're having a purchased version of Visual Studio. Read more here...[^]. If you read this answer, then...
7 Mar 2015 by Brady Kelly
Is there a nice, free set of icons and/or images I can use in my WPF apps? I have the VS2012 image library, but visually searching that monster for even basic things like standard message box icons takes hours. I can't seem to find anything, and I need to find things quickly, or just forego...
5 Mar 2015 by charlieg
Peter - good source. I still cannot get over the flat icons. I guess there is some reason for it.Griff - that's a good source, but a little pricey (I just need one set of icons).HOWEVER, they do have an image to icon generator that will create my set of icons. So, I just need to go...
4 Mar 2015 by OriginalGriff
Depends what you want to do with them.FOr personal stuff, I like http://www.softicons.com/[^], which allow personal use (if not commercial).But if you want an icon for your commercial app, then you are probably going to have to pay, or design your own in order to get anything remotely unique.
4 Mar 2015 by Peter Leow
Ask Microsoft @ Microsoft Azure, Cloud and Enterprise Symbol / Icon Set for Visio, PowerPoint, PNG[^]
4 Mar 2015 by charlieg
Fellow developers, any suggested sources for icons? I've done my google searching, but there is so much debris, mostly links to sites then on to paid stuff.cg
24 Feb 2015 by Member 11474066
I just don't know where to insert the code.And which code.
23 Feb 2015 by Member 11474066
Hi there, does any of you have experiences with Fontello, Font Awesome or sites like 'em?I want to insert some cool icons in my navigation bar.HTML -> http://pastebin.com/ybAm9PyTCSS -> http://pastebin.com/5P7tPhi8THIS THE SITE -> http://puu.sh/g9Fv2/1424ac99b3.png
8 Dec 2014 by Member 10730024
Hi,I tried to implement the default MFC-Icon in an Menu. Got it, but unfortunatly, the background of the icon is NOT transparent. why not and how can I set it to transparent?my source code:CMenu* mmenu = GetMenu(); HICON hIcon =...
15 Oct 2014 by MeritUSA
I have a WinForms program with multiple forms. Depending on the parameters passed at launch time a different form will be run. I would like the form opened to override the icon on the taskbar instead of the default icon from the application.
15 Oct 2014 by ZurdoDev
For future reference, a quick google search would have given you the answer. Also, you can learn a lot from intellisense if you would have just typed in your form name and then a dot you would have seen Form.Icon.See...
4 Jun 2014 by KarstenK
you cant update it!!!So delete the old tooltip and create a new.
4 Jun 2014 by Vaibhav_J_Jaiswal
Hi AllI am stuck at one point. I have made an application in which I want to show the progress status of a task in percentage in the tool-tip of its icon. How can I do this?Below is the creation procedure of Icon:HINSTANCE hInstance = AfxGetResourceHandle();CString strToolTipText...
28 May 2014 by hansoctantan
Hello everyoneCan someone please show me how to change the mouse icon. I have 2 PNG files 1 is for dragging (OnMouseDown Handler) and the other is the default pointer.Found this and it has an error, don't know how to fix thisDim memory_stream As New...
13 May 2014 by Member 10111284
Hi is it possible to change the default icon of a OpenFileDialog in code?This is the code that I have written at the moment, but there isn't a property value for the icon. Is this a limitation or is there a workaround without having to create a control myself.public static FileInfo...
6 May 2014 by Daniel Lieberwirth (BrainInBlack)
This describes a simple way to create interactive, bitmap based, buttons for WinForm applications.
24 Feb 2014 by karthik Udhayakumar
Hello Zubari,Suggest you to follow this articlehttp://www.wikihow.com/Change-or-Create-Desktop-Icons-for-Windows[^]All the Best
24 Feb 2014 by zubair30
Friends,I am making a windows customizer. I want to change desktop icons like My Computer Icon, Documents Icon, Recycle Bin etc. and other icons. I can change folder icon with registry.Any help?
21 Oct 2013 by Sergey Alexandrovich Kryukov
There is no such thing as miracle. You change the aspect ratio of monitor, then the desktop just has to re-arrange. If the way it is re-arranged seems to be less convenient than what you would like, please direct all complains to Microsoft. This is not a software development question.By the...
21 Oct 2013 by CodingLover
Hi all,Every-time once I connect/disconnect the second monitor and extend I have to re-arrange all the shortcuts on my desktop. So I have to spend lot of time to re-arrange them all. How can I stop this, comments really appreciate.Thanks in advance!
17 Sep 2013 by DaveyM69
Have you had a look at this[^]?
16 Sep 2013 by ellasaro
So I have this weird problem,I wrote a program in Visual Studio 2010.At first I configured it so the binary would have an icon, lets call it icon A. Then I changed the configuration again and changed the icon to icon B. The problem is that if I copy/move my binary to my desktop the...
29 Jul 2013 by Ordiales
When no XP support is necessary. Better Icon structure arrises and easy conversion is allowed.
29 May 2013 by wcb2@cornell.edu
I thought of a very easy work-around that might work for others. My underlying problem was due to how Windows caches the icons of application shortcuts. This was preventing me from changing the taskbar icon at runtime. Which is certainly possible. So instead of having the start shortcut pointing...
29 May 2013 by Sergey Alexandrovich Kryukov
Please see my comment to the question. Why?Now, just some notes. The form icon is a different thing, you can really change it easily during runtime. It may even make some sense (different mode of operation, different part of functionality). The icon shown in the Taskbar is a different thing,...
3 May 2013 by Sergey Alexandrovich Kryukov
The icon is only really needed when you want to tell OS what do paint to represent your application be the means of OS. Therefore, it has a transparency feature and a feature which helps you to pack several different bitmaps in one icon object. Reportedly, Windows uses the following set of...
3 May 2013 by Member 4347041
I have made an icon 16x16, 32x32, 64x64 and 128x128 for my app. This icon was made in visual studio, all icons are in the same file,... Now i added my icon to my app: Project --> xxx Properties --> TabPage: Application --> added in Icon and manifest. Why i only see icon 16x16 for...
24 Apr 2013 by Dhiraj Pallin
Was accidently using LoadIcon() which tries to load the big sized icon. Switched to LoadIconMetric()
24 Apr 2013 by Sergey Alexandrovich Kryukov
I would say, doing so is a wrong idea. Why ICO files are needed at all? This is the way to pack few versions of the icon in the same icon object, so OS could pick up the right one, depending on the view, presently, one of the: 16×16, 32×32, 48×48, and 256×256. OS knows what to do. That said, the...
24 Apr 2013 by Dhiraj Pallin
I've made an icon in Visual Studio that has several sizes in it including 20x20 and 16x16, to account for different DPI settings.The problem is that when displaying the small window icon, and the Systray icon, Windows is selecting the 20x20 icon and scaling it horribly down to 16x16, instead...
21 Feb 2013 by niko_tells
hey guys,im trying for hours now to change my add-in logo, but it defentifly doesnt work.I have done it like msdn described it to me: http://msdn.microsoft.com/en-us/library/ms228771.aspx[^]But i dont know why it doesnt work, i have done it like they described, but when i start my...
8 Feb 2013 by Tapirro
Hi, I have problem with saving bitmap as an .ico file. Standard icon.save reduce color depth from 32 to 4 bpp which destroys good look of my picture. Is there any possibility to change that? I´ve tried bitmap save as imageformat.icon but this return gdi++ error.this is my code:Image...
20 Jan 2013 by shizhanbiao
listcontrol proerties styles view Report Now I want to know, can in each insert a line of data later, behind shows a small icon.The question nagged me for days, are not implemented.Ask ace to help me look, how should do.
10 Jan 2013 by fjdiewornncalwe
Rather than posting this as a Q&A question, you might be better off posting this as a comment/question at the bottom of the article in question. That way the author of the article will be notified of your question via email. In this Q&A forum it is very unlikely that the author will see it.I...
10 Jan 2013 by darius_la
I wrote a post in a comunity. Than I found the answer with your class.I want to ask wether I may publish the class, so the members of the forum don't have to log in in Code Project.Nice Greetings, Darius Arnold, Germany
26 Dec 2012 by Schehaider_Aymen
I found the answer, so this is how I proceeded ://header fileprivate: CImageList m_imagelist; CToolBar m_toolbar;&// source fileenum { width = 20, height = 20 }; // width and height of one button imagem_toolbar.Create(this);// create the image...
24 Dec 2012 by Schehaider_Aymen
Hi all, I wanna make a large toolbar with support of icons with more colors depth than default in Visual Studio. I am using Visual Studio 2005. So people, hwo can I create a toolbar with support of 256 colors (for instance). NB: my toolbar is on a CDialog Window. I used the Code...
23 Oct 2012 by Rahul K Singh
In Application Tab of Project property Icon--> BrowseSelect "ICO" file and Rebuild the project. It will change the Icone of exe.Addition from another answer by the same posterUse Custom MessageBox. It will be just a another windows Form which will be called by ShowDialog. Use...
23 Oct 2012 by Tarek Ziani
Change it from "Icon" ..... Browse : Select the "ICO" File and you are done !
16 Oct 2012 by Anandkumar D
Import the Dotnet supported icons in resources and use those icons......... Imported icons will be available in forms properties.
16 Oct 2012 by Mukesh_Chauhan
yes. you need to update your icon in resource file
16 Oct 2012 by philiplobo
i want different icons in my dialog box , is it possible ????
2 Oct 2012 by Petrotheos
To find the .lnk files use this %userprofile%\desktop\*.lnkFindFirstFile functionFindNextFile functionFindClose functionTo manipulate .lnk filesShell LinksYou may needEnumResourceTypes functionEnumResTypeProc callback functionTo draw to device contextDrawIcon...