Change the taskbar icon of another process in Windows - winforms

I'm got 2 applications running in Windows 7. The first application is a C++ bootstrapper that launches the second application. I want to change the second application's icon in the Windows taskbar (the bar at the bottom of the screen) programmatically from the first application at runtime.
Is this possible?
Is there a way to create the second process so that it shares a common taskbar icon with the first one?
I'm trying to create a standalone redistributable for ROBLOX games (the second app here is the game player and I'd like to load a game-specific icon, otherwise the user experience will be confusing)

What you are asking for is generally not possible. Only the process that owns a Taskbar button can manipulate it. A process cannot manipulate another process's Taskbar buttons. Your bootstrapper will likely need to inject code, such as with CreateRemoteThread(), that runs inside of the second process

Related

How does a GUI framework switch windows/window views/forms on Windows?

From what I understand, a GUI will have its windows, window classes, and use these for the main windows and all the buttons and tabs etc.
These would all have handles and be rendered either with the Windows GDI or another backend such as OpenGL. When a user interacts, say by clicking on a widget, there will be a callback function/event handler and it'll do its job. But what is happening when the user clicks on a button that switches the (I'm not sure what to call this so I'll call it a "form" - by this I mean the visible set of all menus and widgets and things - like on Google Chrome I have this tab open right now and I could move to another one that displays a different website and GUI) form.
How does the GUI framework change all the windows on the screen? I can understand it could change what's being rendered with the API of choice, like OpenGL, but how does it get rid of all the old windows and load the new ones? Does it disable all the child windows through their handles, and just leave them there on the screen, but unseen and not accepting input? Does it delete everything and create new windows? How does it actually perform this change (efficiently too)? I may be making a mountain out of a molehill here - if I'm overthinking this please let me know!
I once made a very bad game, using c Win32, the GDI and Direct2D, and when you pressed "play" it'd go to the game, but I just had to hide the buttons in a very glitchy fashion - I had no clue how to perform the "switch."
I have never ever used a "proper" GUI framework like Qt nor have I ever built one myself so apologies for any errata in the question, please correct me. I ask because I want to make my own GUI framework as a long term project (nothing special just something I can say that I've achieved) and I am at a loss as to how I can implement this from a low-level perspective, or rather how industry standards such as Qt will implement this at the lowest possible level.
Any answers would preferably not refer to managed code or any scripting languages, or external libraries - I want to know how to do this in c Win32 + any arbitrary graphics API. Thanks in advance.
This is accomplished by altering the z-order (the idea being that the windows form a stack from closest to the user to furthest away) of children at the appropriate level. The direct children of every window are in some z-order even if they are arranged such that they don't actually overlap.
For example, in the case of a tab control there will likely be a single child associated with each tab, that child representing the view for that tab. When a button is clicked the child for that tab is moved in the z-order so that is above all of its siblings (the forms for the other tabs). Those windows for the tab children will all be the same size (the empty area of the tab's client window) so bringing the child to the top of its parent's z-order will cover all other views.
In the case of the window's API you alter z-order placement via SetWindowPos, if you are going to roll your own (as WPF does) then you will need to re-implement this idea in some manner.

Single Taskbar icon for all Windows in multi process wpf app ( click once deployed)

I have multi process wpf app : 1 master process + 1or more slave process. All these processes have Windows.
Now I have set icon property of all the windows to xyz.ico.
Also I have set ApplicationIcon property of startup project to xyz.ico.
I am deploying the app through click once.
As per my understanding , setting above two icon property should be enough to make sure all windows of all process appear under single Taskbar icon.
But I am seeing that the windows of mater process appear in a Taskbar icon while all other process's windows appear under a different Taskbar icon.
Any idea what am I missing? Or any other technique to achieve this scenario.
Note: I am NOT launching different application. Theres just one app , that app is launching The different processes.
answer: finally we sorted this out using the appUserModelID shell32 APIs. It did work even with click once being used.

Get thumbnail image of the main page of all the running process in window

In my app I want to enable the user to see a small thumbnail, of the main window, for all the running process (that has window).
My app is a regular window desktop application (written in wpf)
I don't want to bring the other processes to foreground before getting the thumbnails
It will be nice if most of the code will be written in .net with PInvoke (if needed) but native is o.k also
Thanks
using DWM I managed to capture the main window for all running process. I've used two great examples (thank a lot for that).
ByBart De Smet For Windows Form:
http://community.bartdesmet.net/blogs/bart/archive/2006/10/05/4495.aspx
For Wpf:
http://www.11011.net/archives/000653.html

How to detect which Window was selected when using Aero peek

I am not even sure how to ask this question...
I have a WPF app with a main window in full screen. It launches new windows in full screen and makes them a child of the main window upon some user interactions. If the user's machine only has a single monitor this child window is supposed to be the focus until closed. However, I have found that using Windows Aero if the user hovers over my application's taskbar icon a preview of both windows appear. This in itself is not an issue except if you try to select the main window of the app nothing happens because the child window is always on top but the peek functionality gives the illusion that the user can switch to the main window and it looks like a bug.
I would like to detect which window the user is selecting and, if it is the main window, simply close the child window. Alternatively I would like Aero to stop showing multiple windows if only one will work.
Anyone had any experience with this?

Mono GUI Window can not be refreshed after moving from one window to another window

I have ubuntu 12.04 and mono 2.10.8.1 in my Linux PC.
I have one .NET application which continuously capturing image from camera connected in my development board.
It is working fine without any issue if i don't move my GUI windows which is continuously capturing image. But when i moves the tab to another window and get back to mono GUI window at that time GUI can not be refreshed and doesn't display live image from camera.
Also, I have also put one panel in which some data like frames and seconds are also going to displayed fine when application is running properly without moving tab to another window. But when i moved the tab into another window at that time same issue caused here that frames are also not going to refreshed in to that panel.
SO, does any one have idea about what is happening in this condition?
Is there any limitation about mono to refresh GUI window or something else?
Please let me know if any one have update as soon as possible.

Resources