How to set different icon in ALT+TAB view and taskbar - winforms

I have a Winform application and I would set two different icons, one for the application shown in the taskbar and the left-upper corner of the window and a different one for the ALT+TAB switch.
The properties Icon of the Form sets only the small one but seems that it is used also for the ALT+TAB view.
In Visual Studio 2012 I've already tried to select a diffenrent icon under Project Properties > Application > Resources > Icon and Manifest.
Any help will be appreciated!

I got the solution which is quite simple. Basically I created a multi-size icon with the same image (64x64, 32x32...) and I changed the 16x16 size with another icon. In this way you can have different type of icon inside one.

Related

Does WPF have GUI layers in the editor?

I have a single window that does initialization first, and then those controls fade out as the Menu controls fade in. Depending on what the user clicks next, the current menu controls will fade out for the next set of controls to fade in.
While developing in the editor (Visual Studio 2017), I often have to hide and show certain controls so I can see the current 'screen layer' I'm interested in.
While I'm working in the editor, is there a way to click on layers in WPF like clicking on tabs? You can think of tabs like "Layer 1" on the window has the initialization controls, then Layer 2 has the menu controls, etc. Then just show/hide layers while developing in the editor like you would in paint programs. I'm just thinking that would make development easier.
No there is no standard way built-in to Visual Studio.
I strongly suggest to split the layers into (user)controls, this way the designer can focus on one thing at the time.

What should I implement for a small popup control in a VSTO project?

In my VSTO projects (Office 2007 / 2010) I would like to use a small popup control (think Tooltip like features; fade animation and mouse interaction).
I would prefer to use WPF. If I were to do this in WPF I would create a custom Popup Control.
In VSTO, as far as I understand it, I must use a WPF window and then have 2 options, either I put this window in a Windows Form Container or I get the Hwnd of my office app and I add this Hwnd to the Owner property of a WPF Window. Am I correct here?
Creating a whole window, animating it on and off the screen etc to look like a ToolTip seems to be overkill.
So my question is how should I do this. I would prefer WPF.
I don't know if this would work but my first thought is to build a very tiny WPF window which is transparent and start it with the Office App. I can then build a Popup Control (which is a child of this tiny window) which I show and not show at a mouse position. Pretty sure a popup can appear outside the bounds of its parent window.
Just wanted to tidy up my own question with what I did. In the VSTO addin project I added a reference to WindowsBase, PresentationFramework and presentation core.
And then I just follow any tutorial or example that adds a WPF Popup. By popup I mean a System.Windows.Controls.Primitives.Popup. For the Placement I used PlacementMode.Absolute and then used a window point to set its position.
This pretty much answers my question. Of course this popup is literally floating above your office window so you will need to make sure that you control it for example if the office window moves, is minimized and the like.

WPF project Taskmanger icon

I have a WPF project. when I run it, the icon appers in the Taskbar and in the app. But in the Taskmanger windows app it's blank, how can I change that?
I have the "icon" property set on the window. And also the projects properties has the icon as its icon.
And also the icon on "programs and features" looks strange
Looks like your ico file has not enough resolutions. Edit it with some graphic software like Free Icon Editor
Take a look at Icons Guidlines
For Classic Mode, the full set is 16x16, 24x24, 32x32, 48x48 and 64x64. (but better have some more resolutions up to 256x256)
Here is screenshot of IcoFX editor with opened icon that has multiple resolutions inside

A window with no taskbar icon, no appearance in Alt-Tab and *without* using the ToolWindow extended style

I have a problem that appears to be new to Windows 10.
I want to create a form that is visible to the user, but with no task bar icon and that does not appear in Alt+Tab.
This is perfectly doable if one is happy to sacrifice the normal styling of a window by following the accepted solutions here for either WPF or Windows Forms.
The general advice for both WPF and Windows Forms is:
Set ShowInTaskbar to false
Enable the ToolWindow styling (either through setting the border style in WinForms or the WindowStyle in WPF)
However, this has a new, practical problem in Windows 10 when using Virtual Desktops: the moment you do the above, the WPF or WinForms window will appear in every virtual desktop. See my example application with a red background:
This affects both the Task View switching screen and the actual desktop itself. No matter where you go, the form is there!
Is there any way to show a form - or even just a bitmap - on Windows without anything appearing in the taskbar, without anything appearing in Alt+Tab and without duplicating the window on every virtual desktop?
I have spent two days researching every possible option, trying every example online, reading MSDN documentation on window styles etc. but all resort to the same method, either through P/Invoke calls or directly, but either way the result is the same.

how to change the wpf window's icon size?

I would like to change the size of the window's icon in the xaml window.
I know that I can hide the window's title bar and create a custom title bar, but is there
any way to change the icon size alone ?
I was looking for many forums and couldnt find a proper solution.
How do I change WPF Menu's icon column size?
The above link explains for menu's icon size but I want for the window's icon
The standard window chrome is handled by the Windows.
I guess the reason for that is consistency across applications which is also the reason why I dislike the Office/Ribbon replacement of the standard chrome.
In Windows 8 Metro applications there will be no window chrome so all UI will be up to you.
In Windows 8 desktop applications (and Windows 7 applications) you will need to replace the entire chrome completely.
To save yourself some coding time, check out this solution over at CodePlex:
http://wpfwindow.codeplex.com/

Resources