19

I am looking into creating a taskbar replacement for Windows 10 in C#. Because of this, I need to replicate some features of the taskbar, such as having a list of icons of apps that are running, pinning and recognizing if a pinned app is running, listen if a window is "flashing", etc.

Because of the nature of the program, there might be multiple ways to do certain things. There have already been some questions about how to obtain a list of running apps in the taskbar. Some of them are old, and were made for an older version of Windows, where the answers or the principles no longer apply. Some of them were trying to accomplish a similar but not the same task, so the answer given was not in the right direction. Here are some, but not all, examples:

Most of these questions are over 10 years old, and some of them I've tried to implement, but since they aren't exactly the same question as I want answered, they don't really work for what I'm trying to do. Some of them that use process filtering or window enumeration keep extra windows that don't actually show up in the taskbar (such as Overwolf and Microsoft Text Input Application). Some of them can get the names of the apps on the taskbar successfully with UI Automation/Accessibility tools, but there is no way to get icon or process information from that.

So, what should I do? Should I ask another question but be specific in my goals, reference the other questions, and explain how my question is different? If have another similar question (for example, I want to capture all windows flashing events, but most of the questions are to capture just one specific one), should I again reference the same project, and do this every time I have a similar question related to the project that has been asked before? This would help make questions more specific and easily searchable, and was going to be my original plan. Or, should I just use one question to explain the purpose of the questions and then ask a couple related questions in one? I was considering this because there might be a way to integrate these things all together that might not be obvious if the questions were asked separately, but it would be much more of a mess to both ask and answer, with the only benefit being that I wouldn't have to re-introduce the project multiple times.

6
  • 1
    So you are trying to create a taskbar replacement by... taking elements from the taskbar you are replacing?
    – Gimby
    Commented Dec 3, 2021 at 9:25
  • 9
    You should make sure to do a lot of research (even outside of Stack Overflow) and show that research in the question. The process of collating that research into a question may very well lead you to the answer. Commented Dec 3, 2021 at 17:40
  • 2
    "should I just use one question to explain the purpose of the questions and then ask a couple related questions in one" It might then get closed as needs more focus. Small packets are better. And "should I again reference the same project" give context but only as much as necessary. If you ask about a small detail you may not need to write down or link to the whole story, just a bit of context is enough. Commented Dec 3, 2021 at 18:06
  • This should be an interesting project, and kudos for taking this on (and I wish more people would, the standard Windows UI leaves a lot to be desired). However, it is probably going to involve a lot of undocumented APIs, and a lot of poking and prodding into winapi, possibly reading some WINE and ReactOS source code. I've read a lot of books on Windows (old and new) and this never came up. Be prepared for 1) hacks, 2) trial and error, 3) your application randomly breaking in an update, 4) bugs/half baked 1980s era C/Asm apis, 5) lots of spy++ reconnaissance.
    – jrh
    Commented Dec 4, 2021 at 14:30
  • Take a look at the responses to the questions you linked, they are all "I dunno, but maybe try this", except this one, which contains a link to a Microsoft blog which sadly have been getting shuffled around microsoft.com over the years and over time (even though they are not usually outdated). Those kind of blogs are extremely helpful, but if you don't already know they exist, you might never find them. Use archive.org a lot for dead links.
    – jrh
    Commented Dec 4, 2021 at 14:39
  • This is unscientific but I remember seeing a lot of "here's how Windows works internally" kind of blogs in the late Windows XP to early Windows Vista era.
    – jrh
    Commented Dec 4, 2021 at 15:03

2 Answers 2

24

Should I ask another question but be specific in my goals, reference the other questions, and explain how my question is different?

Yes, that's usually a good approach.

If have another similar question (for example, I want to capture all windows flashing events, but most of the questions are to capture just one specific one), should I again reference the same project, and do this every time I have a similar question related to the project that has been asked before? This would help make questions more specific and easily searchable, and was going to be my original plan.

Generally, keep each question self contained. It's ok to link to another question to say something like "for more background about the project and its goals, see here"

Or, should I just use one question to explain the purpose of the questions and then ask a couple related questions in one?

Generally that's not a good idea, unless the questions are inherently related (ie, they're about closely related aspects of using a technology to solve some particular problem), as opposed to just coincidentally related (because you happen to have all these questions on your particular project).

13

You should ask one (self contained) question per question. The how to ask help page gives advice on how to ask good questions, including cases where an existing question doesn't quite answer yours.

If you include multiple questions in your post, it is likely to be closed for not being focused enough.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .