PurplePeopleEater
PurplePeopleEater
CC#
Created by PurplePeopleEater on 4/18/2024 in #help
NotifyIcon fails to appear sometimes when my app starts at user login
3) Use my application code to delay showing the NotifyIcon if my app is being launched as part of the user logging in. I think this is an acceptable solution, but not ideal because I have to make an assumption about how long of a delay after logging in will make creating the NotifyIcon succeed. Approximate pseudo-code: if not Debugger.IsAttached then if CurrentTime - CurrentUser.LoginTime < 10 seconds then start a timer that creates the NotifyIcon after the user has been logged in for 10 seconds else // 10 seconds or more has already elapsed since the user logged in so create NotifyIcon without delaying create NotifyIcon end if else // We are running via VS debugger so create NotifyIcon without delaying create NotifyIcon end if Question: - Does anyone know how to pull off solution #2 above as I think that would be the ideal solution? - Does anyone have any other solutions that they have experience with that work really reliably? Thank you in advance for any help!
2 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
The taskbar icon for my app is missing sometimes when my app auto starts upon user logon
bump
3 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
The taskbar icon for my app becomes orphaned
bump
21 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
bump
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
Ok, thank you for the help
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
@Andrew (ryzngard | they/them) Any chance I could get your opion on my two questions from earlier today? https://discord.com/channels/143867839282020352/1210662648241197116 and https://discord.com/channels/143867839282020352/1210625651393175664
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
hmmmm, I also have the option of using WPF, but I know almost nothing about WPF and know Winforms reasonably well - the reverse for you. I like your idea about using Process with cmd.exe though - I think that might be my best option
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
Is that correct or am I missing something?
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
Thank you. But my understanding is that if you use a TextBox (with the queue you are showing) you end up needing to blow away the entire contents of the TextBox each time you write to it in order to fake the "limited buffer size" which is not ideal if you are trying to watch the information scroll by, right?
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
The console also has a limited buffer size so that if I dump a lot of text to it of the course of several days then only the last N messages are kept. That's nice so I don't run out of memory. I don't know if the "limit size queue" thing you mentioned applies to the TextBox and might provide the same functionality?
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
Winforms
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
Right now I write messages to a ring buffer. If the user decides to open the console then any information in the ring buffer gets sent to the console and then subsequent message go directly to the console and the ring buffer is no longer used. I am not writing anything to a file and I want to avoid using a log file and a tool to tail a log file. I don't want to build my own "fake" console (which is what I think you are saying is fairly easy) which would be option #2. The reason I don't want option #2 is because I actually like the functionality of the "real" console such as changing font size on the fly, easy multiline select for copying text, etc. Does that make sense?
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
Ok, I understand what you are saying. And conshost.exe actually allows you to run it without "attaching" it? Also, I am wondering if conhost.exe is actually even the correct executable name depending on the version of Windows the user is on?
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
Basically I want to avoid doing the equivalent "tailing" a log file. How would I go about option #3?
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
Hi Andrew, it only displays information
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
How to close a console created with AttachConsole() by a GUI app without exiting the GUI app
3) Try to launch conhost.exe as a child process (instead of using AttachConsole()) and somehow send my text to it for display if possible. 4) Find a way to actually disconnect and completely close (i.e. terminate the conhost.exe console process) without terminating my app even though my app owns the console via AttachConsole(). I have tried to do this but haven't found a solution yet. Everything I try causes the main app to also terminate. Question: Any ideas how to get option #4 above working? If not, how about option #3? I really want to avoid options #1 and #2 if possible. Thank you for any help!
26 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
The taskbar icon for my app becomes orphaned
Ok, thank you for the feedback 🙂
21 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
The taskbar icon for my app becomes orphaned
@SinFluxx What do you think about my other taskbar icon related question from earlier today? https://discord.com/channels/143867839282020352/1210625651393175664
21 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
The taskbar icon for my app becomes orphaned
@ACiDCA7 Would it be possible for you to take a look at my other taskbar icon related question from earlier today? https://discord.com/channels/143867839282020352/1210625651393175664
21 replies
CC#
Created by PurplePeopleEater on 2/23/2024 in #help
The taskbar icon for my app becomes orphaned
(and my close menu item does the taskbar icon cleanup already)
21 replies