Question Run the exe-file and hide the program in the tray.

Participant

Member
Joined
Oct 26, 2022
Messages
6
Programming Experience
Beginner
Hello. What would the code that does the following look like.
The user double-clicks the left mouse button on the exe-file, the console program starts, which launches the "Telegram" program and minimizes it to tray, the console program closes.
 
There wouldn't be any such code. The icons displayed in the system tray are the result of specific functionality. If an application doesn't include that functionality then you can't use it. If an application does include that functionality but doesn't expose it via a commandline argument then you're still not going to be able to use it without some very kludgy code that would require lots of trial and error on your part and may still not work as intended.
 
The VS General forum is for questions about the VS IDE that are not covered by a more specific forum. Your question isn't about the VS IDE at all. Please post in the most appropriate forum, not just the first one in the list.
 
jmcilhinney, сan't you move the topic to another section of the forum? Should I create the same theme a second time, but in a different section?
 
I did move it. The message was to alert you to your mistake so we could avoid having to move further threads in the future. I probably should have specified that it had been moved.
 
jmcilhinney, thank you. That is, if the program does not have a command line, then it simply will not work to minimize the program into the tray.
 
Yes, the functionality to display the app in the tray would have to be built into the app and the functionality to optionally start the app in the tray would have to built into the app via a commandline argument or maybe a config file or the like - some sort of external source where the instruction to start in the tray is passed in. Displaying in the tray is not something that Windows can just do with any app at all.

If your app was left running, you could start another app and hides its window, then display your own tray icon to enable the user to show that app, but it would have to be your app that provided the specific functionality to display the tray icon and react to clicks on it.
 

Latest posts

Back
Top Bottom