johnnydp 20 Posted February 12, 2019 Std func does not work in Windows 10 for certain apps like Calculator, when Window is focused it's detected as 'ApplicationFrameHost.exe' Share this post Link to post
Der schöne Günther 316 Posted February 12, 2019 What exactly is your question? You have a window handle (HWND) and you want to get the full path to the executable behind it? Share this post Link to post
David Heffernan 2345 Posted February 12, 2019 3 hours ago, johnnydp said: Std func Well, nobody really knows what that is. But your question is how to find the name of a UWP app from a top level window handle. Which is a question asked here https://stackoverflow.com/q/32001621/505088 1 Share this post Link to post
KeithLatham 5 Posted February 12, 2019 How about myappname := extractfilename(paramstr(0)) Delphi Basics: paramstr 1 Share this post Link to post
David Heffernan 2345 Posted February 13, 2019 7 hours ago, KeithLatham said: How about myappname := extractfilename(paramstr(0)) Delphi Basics: paramstr That's the name of the executing process. Asker wants to know about external processes. 2 Share this post Link to post
KeithLatham 5 Posted February 13, 2019 1 hour ago, David Heffernan said: That's the name of the executing process. Asker wants to know about external processes. Oh, yeah. My reading comprehension is a bit down today I guess. Share this post Link to post
johnnydp 20 Posted February 13, 2019 Sorry I mean that code: https://stackoverflow.com/questions/22002120/how-to-get-path-of-current-active-application-window Thanks. Yes mentioned URLs to stackoverflow contain the same problem asking, but there are many answers and comments I don't know which one is realiable. Has anyone had something similar in Delphi which works ? Share this post Link to post
David Heffernan 2345 Posted February 13, 2019 (edited) 4 hours ago, johnnydp said: Sorry I mean that code: https://stackoverflow.com/questions/22002120/how-to-get-path-of-current-active-application-window Thanks. Yes mentioned URLs to stackoverflow contain the same problem asking, but there are many answers and comments I don't know which one is realiable. Has anyone had something similar in Delphi which works ? That SO topic is the same issue as yours. You might have to do a bit of research starting there. What you need to do is find the child process that actually implements the app. Lots of code examples to do that. Edited February 13, 2019 by David Heffernan Share this post Link to post