Click here to Skip to main content
15,905,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Let me explain you the scenario. There is a win32 dll that is being called by Java Applet. Win32 dll has the code to create a window and show the window. Everything works fine but the problem is, this window is hidden under the browser (Internet explorer) and the user has to Alt+Tab to see the window.

Can someone suggest what can be done to directly show the window over browser? Its a kind file->open on Internet explorer.

Thanks in Advance,
Hari
Posted
Updated 8-Feb-11 9:13am
v2

In your DLL, call SetForegroundWindow on the window handle.

See http://msdn.microsoft.com/en-us/library/ms633539(v=vs.85).aspx[^]
 
Share this answer
 
v2
Comments
programmer095 8-Feb-11 15:34pm    
A 5. Enough for practically all purposes.
Sergey Alexandrovich Kryukov 8-Feb-11 15:36pm    
I have to agree - my 5.
--SA
Do you have an access to the win32 dll code? If so, call ::SetWindowPos to set it at the top of the Z-order. See MSDN docs[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 8-Feb-11 15:36pm    
I think this is another valid variant - my 5.
--SA
In most general case, you need two Windows API calls: SetForegroundWindow and SetActiveWindow.

—SA
 
Share this answer
 
Comments
Nish Nishant 8-Feb-11 15:28pm    
SetActiveWindow is a good point, voted 5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900