I am searching for alternatives to the old User32.dll
version of switching to a different application with FindWindow()
and SetForegroundWindow()
.
I did find an alternative to the first with the usage of Process.GetProcessesByName()
but I do not see the corresponding method to switch (set active/foreground) to that application.
Is there a way of doing that without using the old way with the User32.dll
?
Thank you for your help.
EDIT
I accepted the answer of @Sorceri although it is not the answer I was looking for.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…