Some Windows applications like for example Sublime Text 3 get focus on their window when they are opened and you click the .exe file. The thing I'm aiming for is taking focus from any opened app that way. I use Qt5 and C++ for my program. The key thing is that app should not only have one instance at a time but it should focus on instance that already exists when you double click .exe file
Asked
Active
Viewed 217 times
0
-
To my knowledge, all programs get focus when you manually start them. Could you be more specific on what you are trying to do? – default Jul 24 '16 at 12:04
-
All program get focus when you start them but not all programs get focus when they are already started and you double click their exe file. – MPWrobel Jul 24 '16 at 12:08
-
Oh, are you trying to have only one instance of your program running? – default Jul 24 '16 at 12:12
-
Yes and I want to get focus on this one instance. – MPWrobel Jul 24 '16 at 12:14
-
1Related: http://stackoverflow.com/questions/17937618/how-to-use-qtsingleapplication – Matteo Italia Jul 24 '16 at 12:14
-
Also related: http://stackoverflow.com/questions/4191465/how-to-run-only-one-instance-of-application – default Jul 24 '16 at 12:15
-
It's not the solution. I want to get focus on existing instance. – MPWrobel Jul 24 '16 at 12:52