Java (JNA) vs. Visual Studio: Bringing Minimized Third-Party Application to Foreground #1747
Unanswered
veeramani-atos
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Eclipse with Java to bring a third-party application to the foreground. For this, I am utilizing:
JNA 5.12.1 JNA Platform JAR 5.12.1
However, when the third-party application is minimized, it only gets highlighted in the taskbar instead of opening in the foreground. In contrast, applications like Notepad open in the foreground as expected.
When I tried the same approach in Visual Studio, the third-party application successfully opened in the foreground, even when minimized. In Visual Studio, I used the SetForegroundWindow API, which worked perfectly to restore my application when it was minimized. In Java (Eclipse), I used ShowWindow to restore the minimized application and SetForegroundWindow to bring it to the front. However, it only highlights the taskbar icon instead of bringing it to the foreground.
My expectation is that my application should come to the foreground when using Eclipse with Java, just like it does in Visual Studio``
package focuswindowtest;
import com.sun.jna.;
import com.sun.jna.platform.win32.;
import com.sun.jna.platform.win32.WinDef.*;
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.platform.win32.Kernel32;
public class focuswindowtest {
}
Beta Was this translation helpful? Give feedback.
All reactions