✅ Minimize to tray
I've googled, used chat gpt, and done everything I can think of but I can't find a way to minimise my application to tray. What I want to minimize is the Console, if theres a way I can write text in a window that looks like a cmd but isn't the console that would make it easier to minimise to tray please help tell me. I can send the code i've got right now and keep in mind I am a beginner and started today.
41 Replies
you click this button
yea but that minimises to task bar i want it to minimize to tray
Not really doable with a console app afaik
since you need a gui handle to make a trey icon
is there a way I can make something that looks like this other than logging to console?
and slowly like
or rather, its doable, but you'll essentially be making a winforms app
loads text
with delay
¯\_(ツ)_/¯
tf is winforms
a GUI framework
You're using the console, pretty much the only way to put thing on the screen is to write it to the console
yea
so is there a way to make it go to tray
when i click that
However you can do this.
with winforms?
with just the console
yea ik
i use
Thread.Sleep(150);
or somethinmg like that
idk
im newthat or
await Task.Delay(150);
yea but im tryna get it to do this
so it looks better
in my opinion
and idk if task.delay would work
havent tried
If you want to write a "fancy" console app, consider using $spectre
Spectre.Console is a .NET library that allows for easy creation of console UIs, text formatting in the console, and command-line argument parsing.
https://spectreconsole.net/
Spectre.Console - Welcome!
Spectre.Console is a .NET library that makes it easier to create beautiful console applications.
what does your application do once it detects a roblox instance btw?
it closes it
and thats it so far
but.. why?
and what do you want it to do at a later stage?
cuz its going to inject an fps unlocker
that sounds like violating roblox TOS
its not
injecting ANYTHING into their client will 100% violate their TOS
a roblox dev said it isnt bannable
or against tos
same with shaders
If you can link me the exact paragraph of the TOS where it says "injecting custom code into our executables is fine", that would be swell
bro
it changes a file
not the application running
Users may not ... (b) copy, modify, distribute, publicly perform or display, reverse engineer, disassemble, modify, or create derivative works of the Services or related or implemented technology ...thats a direct violation of paragraph 6
idk
idrc
its an fps unlocker
im recreating an already existing one
Can you pop over to #info-and-rules and re-read our rules
im not making it inject something
there u go
i was joking
lol
keep in mind that discord has a very unusual TOS paragraph that forbids violating OTHER products TOS
huh
yea
but that lags your game
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Regarding the topic of tracking minimizes on console apps.
I believe this is possible using WinEventHooks albeit a unusual (we're using PInvoke)
In my case I am using 2 specific Nuget Packages
The attached screenshot shows two respective events being written to the console
22 (Minimize (Start))
23 (Minimize (End)) (Not minimized)
Coupled with a possible tray icon via WinForms on some other thread maybe.
You can use User32.ShowWindow to hide / show the console window (SW_HIDE is 0 and SW_SHOWNORMAL is 1)
Attached is the proof of concept code:
Downsides would be: if hosted within something like Windows Terminal or other parent attached processes, it would track the parent.
(You minimize Windows Terminal and you would hide windows terminal and all its tabs)
You Minimize Rider or Visual Studio Code, you hide those programs to the tray too since they're running your code
This can be mitigated by getting the parent process' name, if any then not doing this if there is an attached parent.