❔ Question How can I get the name of the application the user is currently focused on?

So I have a .NET 7.0 app, and I want to see if the app the user is focused on is firefox/chrome, and then close the app I redirect to a weblink and I need to see if the link opened
6 Replies
Reabstraction
ReabstractionOP2y ago
I just want windows compat
phaseshift
phaseshift2y ago
Sounds dodgy To open a web page with the default browser on windows you just launch a Process with shell execute option= true
Reabstraction
ReabstractionOP2y ago
I need to know which one opened and I don't want to be hacky and check the registry
phaseshift
phaseshift2y ago
Process class gives the proces id
Reabstraction
ReabstractionOP2y ago
thx
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server