I've tried and scouted around for a fix but I'm surprised by the lack of info out there. This process should be so simple and easy to implement, just changing the solution's icon to an acceptable-format icon.
However, I have tried to create my own icon and VS 2015 accepts that it is the correct size/format (I don't get error that states "Argument 'picture' must be a picture that can be used as an icon." but the icon in the top left corner of my winforms stays that awful default picture icon (not the 3 red/blue/yellow computer screen mind you, but the stupid broken page/form icon?), and on my task bar it stays the same, even though I've gone through project-->properties-->application--> and included my proper .ico with the correct location. I've also changed the Icon in the winforms property tab to be the same .ico file to no avail.
I've also tried to clean/rebuild solution, restart/reinstall VS 2015 comm and nothing.
Does anyone know what's going on with this? I've put this part of my project off as long as I could as it is just a cosmetic attribute really, but it's driving me nuts something so simple is too complicated or broken. I couldn't find specific information about the dimensions needed for .ico icon in my solution, but I know it's 32x32 pixels, and I've created all the variations of a 32x32 .ico in the visual studio paint editor. Visual Studio does not display a single one of them, just the broken blank page icon instead.
Just want stupid thing to display the right icon >.>
Thanks in advance.
Related
I am taking an introductory course in C# programming, and one of the objectives in my upcoming assignment is to include an icon, stored as a resource, in the WinForms application's main form (top left). All the properties of the Form are the default ones.
I have not been able to figure out why it won't work. I can create an icon resource, and it is accessible from code. The icon is named T32.ico.
this.Icon = Properties.Resources.T32;
It all compiles OK, but the actual icon showing is still the default one. I have tried 16x16 bmp and 32x32 bmp, both 8 bit and 32 bit versions.
If it matters, I'm running Windows 10 and using Visual Studio Community 2019, 16.8.2, and the application I'm writing is using .NET Framework 4.8.
Any guidance is very much appreciated.
After many hours of exploring all possible aspects, I think I found the root cause.
When creating an icon resource from within Visual Studio, there are automatically a set of different icon formats created, all within one single .ico file. The 32 bit icons are not possible to edit using the Visual Studio Image Editor, while the 8 bit icons are. For some reason, the application seems to default to one of the 32 bit icons.
By removing all but the 8 bit versions, I was able to make it work.
I'm having this weird issue with Visual Studio 2015, and I'm not sure if it's my fault or if it's a glitch. I originally built this program using an icon that was dominantly black. I've since noticed that the black is way too hard to see on the Windows task bar, and even on the desktop. I updated the logo to be dominantly white with a black border to make it pop. However, when I update the .ico file in the project properties (not form properties), and rebuild the executable, it still uses the old black logo.
Here's where it gets funny. I deleted any instance of this old logo that I had (even in the project resources folder), and it still does it. It's obviously caching this file somewhere, but I don't know where, and this is really starting to bug me. If someone could help me with this or has any idea's, I'd really appreciate it!
Thanks :)
Try to rebuild the Windows IconCache.
go to C:\Users\Username\AppData\Local folder and delete the hidden
IconCache.db file. Reboot.
Source: The Windows Club
What version of Windows do you use?
You could also try deleting the iconcache files in "%localappdata%\Microsoft\Windows\Explorer\"
Source: Ten Forums
I'm new to Visual Studio and couldn't find my answer anywhere else for hours over the internet..
I'm Using "Visual Studio Express 2012 for Windows" and everytime I create a new project with a blank page (XAML), the designer only shows me the frame of the page with its missing background.
And any control I drag to it, is invisible (I can only see the square border of the control I dragged but no texture..)
This is only happening during design time. On RunTime it actually shows up..
This is happening to me since I had the first fresh install. Just to be clear, I am NOT opening an existing previous project.. I have non. This is the first time I make a project in C# and I'm surprised I didn't find anything useful so far over internet search..
Also tried installing, uninstalling, repairing and changing to different versions...
The problem didn't show on Visual Studio 2012 Express for Desktop, but this product doesn't seem to be fit to my needs.. (I'm trying to also learn how to develop for Windows Store and other products)
The IDE doesn't show any errors or warnings..
Help would be much appreciated!
P.S - I'm running Windows 8.1
You can try Blend to open the project and render the xaml,if the problem appear too, maybe you should check out your graphics card or update driver.
try with this!
Check the following:
Tools -> Options
Expand Text Editor -> XAML -> Miscellaneous
Make sure that "Always open documents in full XAML view" is not checked
Or perhaps the default program for opening .xaml files has changed:
Right-click your .xaml file in Solution Explorer
Click Open With...
Select XAML UI Designer
Click Set as Default button
Click OK
If it's related to the video driver, maybe disabling hardware acceleration will help?
Or you could try Visual Studio Community Edition (http://www.visualstudio.com/, click on the Download button under "Free developer tools"
Did one of these suggestions work?
I have created two windows in my project root folder, MainWindow.xaml and PopupWindow.xaml respectively.
Through Project Properties, I managed to set up an icon for the MainWindow but I couldn't find any available settings for my PopupWindow. Therefore, the PopupWindow is still showing the system default icon in the top left corner.
Can anyone tell me where I can set up a customized icon for my PopupWindow?
Many thanks.
Edit:
I guess I made a mistake in the XMAL code previously. :[
Should have been more careful about the code. Anyways, here is the correct one
Icon="/[Your Project Name];component/[Your ICO File Name]"
Are you running in Debug mode in Visual Studio? WPF Windows don't inherit their icon from the application in debug mode. Try Ctrl+F5 ("Start Without Debugging") and see if your icons appear.
not sure but perhaps this helps
http://www.codeproject.com/KB/WPF/WPF_xaml_taskbar_window.aspx
For some reason, a very old version of my icon keeps showing up when my application is dropped on the desktop. In the windows explorer (in all zooming levels) the icons is correctly the assembly icon. I specified the correct item in both XAML Window.Icon and in the project settings.
I have deleted the old version of my icon from all folders I can think of, but it still shows up. Also while drag and dropping, the wrong icon is shown. (in the slightly transparent preview window)
I tried cleaning and rebuilding, I tried deleting the obj folder manually...
The original, wrong icon was 16x16. I have built the new version as 32x32, because on the desktop 16x16 is too small.
According to the msdn docs (http://msdn.microsoft.com/en-us/library/system.windows.window.icon.aspx), each .ico file is supposed to incorporate all smaller sizes anyway.
I also checked that I changed the icon for both debug and release configuration.
Thanks for any ideas! :)
Could this be a problem with the IconCache? Try deleting %localappdata%\IconCache.db and restarting Explorer.exe.
Check the Visual Studio properties window for the EXE's project -- you can specify the icon that's written into the EXE at compile time. This is separate from the icon that's assigned to the XAML window at run time.