Always on-top window help!

I am trying to get a window to be on top of a game application called "halo". The problem is that the game always want to be on top and I have tried to use a program called AutoIt, but I have to keep on setting the window to be ontop which cause a flickering effect. I would also like to make the window invisable and some buttons/images on it transparent. How would I do this?

try this link: http://forum.java.sun.com/thread.jsp?forum=57&thread=156009&tstart=975&trange=15

Similar Messages

  • Always on top windows

    How can I make "Always on top" window in Java?
    Thanks

    Hi, i a using jdk1.3 on mandrake linux, how to make Jwindow reside on top of all the other windows, i've tried using the listeners, problem is once the focus moves to any of the child component of the window, the focus listener for Jwindow will not work, even requestFocus on the jwindow doesn't get the focus on the window, i can't take JFrame, (don't want title bar), if any body can help with JNI code on linux to make the Jwindow always on top.
    shivajee

  • About "Always on Top" windows

    Hi all,
    My application needs an always on top window and I used a dll written
    by Mitch Goldstein. It works perfectly on jvm 1.3.1, but when I try it
    on jvm1.4.1 which is more popular today than 1.3.1, it just doesn't
    work, without any exceptions.
    Can anybody give some hints? Thanks a lot.
    The "Always on top" package written by Mitch Goldstein with examples
    can be downloaded from the following address:
    http://www.esus.com/javaindex/j2se/jdk1.2/javaxswing/toplevelcontainers/jframe/jframealwaysontop.html

    For JRE 1.3 and above, the following code addresses the issue of having two windows with the same title. The function takes a Frame as a parameter, gets the HWND using the AWT Native Interface, and then calls SetWindowPos. Agreed, this code is far more complicated than smg123's solution, but if there's a chance of two windows having the same title, it's probably better to use this:JNIEXPORT void JNICALL Java_JSystem_setWindowAlwaysOnTop__Ljava_awt_Frame_2Z (JNIEnv *env, jclass cls, jobject frame, jboolean flag)
         typedef jboolean (JNICALL* PJAWT_GetAWT) (JNIEnv*, JAWT*); // Function pointer
         JAWT jawt;
         JAWT_DrawingSurface* jds;
         JAWT_DrawingSurfaceInfo* jdsi;
         JAWT_Win32DrawingSurfaceInfo* jdsi_win;
         HANDLE hAWT;
         HWND hwnd;
         jboolean result;
         PJAWT_GetAWT JAWT_GetAWT;
         LPTSTR buf;
         jclass sys;
         jmethodID home;
         jstring ret;
            // This section of code is needed in order to find jawt.dll
         sys = (*env)->FindClass (env, "java/lang/System");
         home = (*env)->GetStaticMethodID (env, sys, "getProperty", "(Ljava/lang/String;)Ljava/lang/String;");
         ret = (jstring)(*env)->CallStaticObjectMethod(env, sys, home, (*env)->NewStringUTF (env, "java.home"));
         buf = (LPTSTR)(*env)->GetStringUTFChars (env, ret, NULL);
         strcat (buf, "\\bin\\jawt.dll");
         hAWT = LoadLibrary ((LPCTSTR)buf);
         if (!hAWT) return;
         JAWT_GetAWT = (PJAWT_GetAWT)GetProcAddress(hAWT, "_JAWT_GetAWT@8");
         jawt.version = JAWT_VERSION_1_3;
         result = JAWT_GetAWT (env, &jawt);
         jds = jawt.GetDrawingSurface (env, frame);
         jds->Lock(jds);
         jdsi = jds->GetDrawingSurfaceInfo (jds);
         jdsi_win = (JAWT_Win32DrawingSurfaceInfo *)jdsi->platformInfo;
         hwnd = jdsi_win->hwnd;
         SetWindowPos (hwnd, flag ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
         jds->FreeDrawingSurfaceInfo (jdsi);
         jds->Unlock(jds);
         jawt.FreeDrawingSurface (jds);
         (*env)->ReleaseStringUTFChars (env, ret, buf);
    }Note that you must include jawt_md.h as that's where all the types such as JAWT are declared. You can link statically with jawt.lib, but as it is dangerous to assume the JRE version on the user's system, it's probably a better idea to link dynamically and handle any errors that occur.
    Hope that helps.
    Cheers

  • Always-on-top window property

    Hi guys,
    Starting to like fx beta a lot.
    Is there any way to initialize stage with always-on-top window property? Any plans to support it?
    Thanks,
    Alexander.

    Yes It would be grate to support this,.

  • Problem creating an "always on top" window

    Hi to all,
    I'm developing an application and I want to create an "always ot top" window (for win32).
    I used madtown54's c++ code (http://forum.java.sun.com/thread.jsp?forum=57&thread=348024&message=1443221#1443221), but at runtime I receive this error:
    java.lang.UnsatisfiedLinkError: getNativeWindowHandle
    at com.tilab.newtel.popupclient.DisplayMessage.getNativeWindowHandle(Native Method)
    I'va also tried vdbjoris' code(http://www.esus.com/docs/GetQuestionPage.jsp?uid=102 ), but with the same result...
    Any suggestion?

    Thank you for your reply!
    Yes, I have. I receive an error when I try to call a native method, not when loading the .dll library.
    Any other suggestion?
    Luca

  • How to Create Always on Top Window OR Frame

    hi i m hasan, i m using windows 98, and i want to know that how to create a Window OR Frame, which should remain always on top. In windows 98 by pressing windows+D key hides all windows and dailog boxes. But I want it should remain always on top even if some one press windows+D key it should not be minimized.

    Try this code. It should be work on all windows which are inherited from java.awt.Window
    * Call this from class consructor
    public void initialize() {
    TopThread top = new TopThread();
    top.start();
    * Keep JWindow on top (inner class)
    class TopThread extends Thread {
    public void run() {
    while(true) {
    toFront();
    * Let 10 milliseconds for other code to execute
    try {
    Thread.sleep(10);
    catch(Exception e) {
    // Nothing to do

  • Always on top window (not modal)

    Hi, everyone:
    Is there a way of making a window to be displayed always on top? I don't want it to be a modal window. I want the user to be able to flip to another (background) form, but still being able to fully see my current form on top.
    Thanks a lot.
    Regards,
    Eugene.

    Yes this is possible - if you are using Forms client server on windows you can find the code on Metalink (metalink.oracle.com) Note:68822.1

  • Can I make the TestStand Properties dialog an 'always on top' window?

    I am having window Z order problems, such that calling PropertyObject.DisplayPropertiesDialog() sometimes sends the window behind the my application window. This causes people to think that the application has crashed (it's only waiting for them to dismiss the properties dialog), and often results in the fatal three finger salute.
    This problem cannot be solved by setting Engine.AppMainHwnd, or using the PropDlgOption_ModalToAppMainWind option - it's a long story. Is there a way to set the Z-order priority of TestStand dialogs? If I could set the dialog to 'always on top', all my problems would be solved.
    Thanks,
    Aaron Stibich
    Senior Engineer
    Innovative Technologies Inc.

    Hi Aaron,
    Unfortunately there is no way in TestStand to set the Z order property. You may be able to use Windows API calls though to accomplish the same goal. I will however put in a product suggestion for you so that this request may be looked at.
    Thanks,
    Caroline
    National Instruments
    Thanks,
    Caroline Tipton
    Data Management Product Manager
    National Instruments

  • When using facebook and youtube, switching tabs causes youtube content to popup into a persistent always on top window

    I have disbled all add-ons. This problem has only started to occur in the last week. I can provide a screen cap if necessary.

    I had saved one copy as an .asp but then resaved it to .xhtml 
    I'm assuming this is a static web site.  Rename (F2) all your pages with .html or .htm extension. 
    .xhtml is not a valid extension.
    Nancy O.

  • "Always on Top" of jdk 1.5 is not working when...

    I created a sample application that has Frame/Window and displays some text. Then i needed to make the window always visible on top of any other application or windows. But then when i opened applications like Battle Realms, Counter Strike, or any other games, the window is blocked by the previously run application.
    Can you help me on how can i provide solution with this?
    Thanks in advance.

    This might help you!!!
    About setAlwaysOnTop()
    Changes the always-on-top window state. An always-on-top window is a window that stays above all other windows except maybe other always-on-top windows. If there are several always-on-top windows the order in which they stay relative to each other is not specified and is platform dependent.
    If some other window already is always-on-top then the relative order between these windows is unspecified (depends on platform). No window can be brought to be over always-on-top window except maybe another always-on-top window.
    All owned windows of an always-on-top window automatically become always-on-top windows. If a window ceases to be always-on-top its owned windows cease to be always-on-top.
    When an always-on-top window is sent toBack its always-on-top state is set to false.
    This method makes the window always-on-top if alwaysOnTop is true. If the window is visible, this includes bringing window toFront, then "sticking" it to the top-most position. If the window is not visible it does nothing other than setting the always-on-top property. If later the window is shown, it will be always-on-top. If the Window is already always-on-top, this call does nothing.
    If alwaysOnTop is false this method changes the state from always-on-top to normal. The window remains top-most but its z-order can be changed in the normal way as for any other window. Does nothing if this Window is not always-on-top. Has no effect on relative z-order of windows if there are no other always-on-top windows.

  • XWindows JNI Always on Top

    Could anyone direct me in a possible way to implement always-on-top window on Linux with JNI for X-windows. I'm attempting to write Always-On-Top helper classes for Windows, OS X, and Linux.
    here's a link I found about it:
    http://groups.yahoo.com/group/java-linux/message/14777
    I have no experience programming X-windows, but am willing to put some effort into it.
    Also, I'm having a hard time loading libraries on Windows and OS X:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=429203
    http://forum.java.sun.com/thread.jsp?forum=31&thread=428106

    I'm gonna go with a fairly easy, but not exactly correct approach.
    setFocusableWindowState(false);
    and have a thread call .toFront() every 1/3 second
    This only appears to work in linux, not windows(maybe OS X, haven't tried...)
    --Zephryl                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Video always on top

    had to reinstall everything, including itunes, but can't figure out how to have videos always on top again.
    help please.

    Oke, i've found out that there is no problem while using Banshee. So the screen is always on top playing nibbles and using Totem Movie Player.
    Is there someone who knows what might be wrong?

  • HTA Always on Top

    Hi all,
    I've got a lovely HTA that is intended to be displayed on all our users screens at Windows startup, as defined by a GPO.  While everything is working fine, I'd really like to have it as an "always on top" window or at least grab focus/flash whenever somebody clicks away.
    Every forum thread I've found via Google says this is not possible, but other people have found 'hacks' to get this to work.  Various people mention either modal/modeless dialogues or using an onblur function.  Unfortunately, as a self taught 'coder', my VBS/HTA powers are fairly weak and I don't really know how to put this into practice.
    Would anybody be able to give me some guidance on how I could possibly launch the HTA and retain focus or keep it above other windows somehow?
    Cheers
    Andy

    You need a Third-party application
    http://www.nirsoft.net/utils/nircmd.html 32 or 64 bit version
    put nircmdc.exe in your path or in the folder with hta file,
    now use this sample .hta
    <!========================================================================
    <!
    <! NAME: RusiaToday.hta
    <!
    <! REVISION:
    <!
    <! AUTHOR: Emprear / gc.gianello[dot]gmail.com
    <!
    <! DATE  : 15/02/2013 09:03:38
    <!
    <! COMMENT:
    <!     Rusia Today en Español
    <!     Canal Internacional de Noticias
    <!
    <!======================================================================-->
    <!
    <html>
    <head>
    <title>RusiaToday</title>
    <script type="text/javascript">
    window.resizeTo(470,300);
    var intHorizontal = screen.width;
    var intVertical =screen.height;
    var left_pos = (intHorizontal - 470) / 2;
    var top_pos = (intVertical - 300) / 2;
    window.moveTo(left_pos,top_pos);
    </script>
    <HTA:APPLICATION
    ID="RusiaToday"
    APPLICATIONNAME="RusiaToday"
    BORDER="Dialog"
    BORDERSTYLE="Normal"
    CAPTION="yes"
    CONTEXTMENU="no"
    INNERBORDER="no"
    MAXIMIZEBUTTON="no"
    MINIMIZEBUTTON="no"
    ICON = "http://actualidad.rt.com/favicon.ico"
    SCROLL="no"
    SELECTION="no"
    SHOWINTASKBAR="yes"
    SINGLEINSTANCE="yes"
    SYSMENU="yes"
    WINDOWSTATE="Normal"
    >
    <script type="text/javascript">
    function ontop(){
    if ((document.getElementById('wtop').innerHTML) == 'notop') {
    document.getElementById('wtop').innerHTML = 'top';
    new ActiveXObject("WScript.Shell").Run('%comspec% /C nircmdc win settopmost title RusiaToday 0',0,true);
    }else{
    document.getElementById('wtop').innerHTML = 'notop';
    new ActiveXObject("WScript.Shell").Run('%comspec% /C nircmdc win settopmost title RusiaToday 1',0,true);
    </script>
    <style type="text/css">
    html, body{
    padding: 0;
    border: none;
    margin: 0;
    overflow: hidden;
    object#rto{
    margin: 0;
    border: none: padding: 0;
    left: 0;
    top: 0
    z-index: 1;
    button#wtop{
    top: 1%;
    right: 1%;
    z-index: 999;
    width:38px;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 4px;
    /*]]>*/
    </style>
    </head>
    <body style="background:#1E1D11">
    <object type="application/x-shockwave-flash" data="http://actualidad.rt.com/static/jwplayer/player.swf" id="rto" height='274' width='470'>
    <param name="movie" value="http://actualidad.rt.com/static/jwplayer/player.swf" />
    <param name="loop" value="false" />
    <param name="menu" value="false" />
    <param name="play" value="true" />
    <param name="wmode" value="transparent" />
    <param name='allowfullscreen' value='true'>
    <param name='allowscriptaccess' value='always'>
    <param name="flashvars" value="&autostart=true&backcolor=0x000000&bandwidth=1016&controlbar=over&file=RT_Spanish_2&frontcolor=0xffffff&image=http%3A%2F%2Factualidad.rt.com%2Fstatic%2Fvideo-player-bg.png&lightcolor=0xffffff&mute=false&plugins=viral-2d&screencolor=0x404040&skin=http%3A%2F%2Factualidad.rt.com%2Fstatic%2Fjwplayer%2Fplayer_skin.zip&streamer=rtmp%3A%2F%2Frt.fms.visionip.tv%2Flive%3Fautostart%3Dtrue&viral.onpause=false"
    />
    <param name="bgcolor" value="#1E1D11" />
    </object>
    <button onclick="ontop();" id="wtop">top</button>
    </body>
    </html>
    Look at the ontop() function and how alternate top and notop status using nircmdc command line utilitiy
    Thats all
    Regards

  • JWindow - always on top

    I've got a JWindow which appears always on top - not just of other Java windows but of any window in the window manager, but I'd prefer it to be always underneath or at least behave normally. All I seem to get from Googles is cases where people are trying to get this behaviour but can't because this kind of thing is supposed to be platform specific and out of Java's control?!
    This seems to happen in Gnome 2.8 and Openbox on Linux so I'm presuming it's not specific to a single WM. Any (constructive!) suggestions appreciated :)

    Copied from the javadocs:
    "Note: some platforms might not support always-on-top windows. There is no public API to detect if the platform supports always-on-top at runtime."

  • "Show Desktop" bug forces any program windows to be stuck "Always-on-top"

    What I found under Windows 7, when you use the "Show Desktop" feature (I prefer the ⊞ Win + D shortcut) and then bring all windows back by using it again, some windows behave as if they're glued to the front of the z-order. What this means is, say, I have windows
    A B and C open, with focus on A, hit ⊞ Win +D twice, and now it may happen that if I then want to switch to B or C, either by Alt+Tab or by selecting them on the taskbar, the taskbar shows the highlight, but A stays visible (and usable, it's not just a rendering
    issue) in the foreground.
    Imagine the following situations, all three windows cascading and overlapping:
    A (focus)
    B
    C
    -> ⊞ Win + D
    Desktop (focus)
    -> ⊞ Win + D
    A (focus)
    B
    C
    -> click C on taskbar
    A
    C (focus)
    B
    -> click B on taskbar
    A
    B (focus)
    C
    And so on. Focus means actual input focus, i.e. in second situation, any keyboard typing is sent to window B while window A is in the foreground.
    It does not matter what kind of application; in my current case an instance of Outlook and an instance of Explorer is stuck, while a second instance of Explorer and an instance of Firefox behave normally. This should show that this problem can occur even between
    multiple instances of the same application, and that there are no fancy applications involved that like to pretend they are the most important program and internally force "always on top".
    Showing and unshowing the desktop again doesn't help; in the worst case another window might end up with the "glued to the top of the z-order" too. Between those, I can easily switch, but in order to get a window which still behaves normally on top, I have
    to manually minimize the offending windows.
    The only cure seems to close the offending windows so far, I've not found anything else that helps.
    Could it be that Windows 7 has a bug that can force an ALWAYS_ON_TOP flag
    onto some windows when restoring from "Show Desktop", or am I doing something wrong?
    More information from another user:
    I use win+d. Issue easy to replicate, Win7-64bit-Ultimate.
    The affected windows (any program) seem to be placed into a separate "Z" group. You can place multiple/many windows into this always-on-top state, those in the affected state will function normally in relation to each other with the exception that: - The group
    as a whole is always-on-top of any non-affected window - The whole group is on top of the taskbar. - The whole group does not respond to (context on taskbar) "cascade windows" or similar commands.
    The fact that the affected windows are on top of the taskbar and otherwise function as "special windows" shows that windows 7 has a hidden "feature" of always-on-top that gets applied with Win+D. The feature appears to place windows in a super window state
    that is on top of the taskbar. The normal group remaining behind the taskbar. (When you click the start menu or context menu of the taskbar, the start menu/taskbar comes to the foreground of the always-on-top group, however this does not revert the affected
    windows, only a temporary takeover until you switch to something other than the start menu/taskbar)
    This is key to finding an answer. How do we get windows to unassign the special status or not do the assignment in the first place?

    It appeared to have cleared by closing all windows and restarting. Initially I could not reproduce the error, then after opening all my working windows, I did indeed reproduce it on any window.
    I almost think it could be initialized with something to do with multiple windows of Chrome, and then the show desktop problem will crop up once one window has it. This was because: After messing around some more with a chrome session saver (session buddy)
    and restoring sessions and getting the super state, I restored and closed the window I was in and now I am again at a place where I can not reproduce the error, even in my "work environment" with some 35 chrome tabs in two windows, plus other programs, file
    locations, remote desktops and a second chrome profile with another dozen tabs.
    So, back to square one with finding the actual instigator of the super state phenomenon.
    Once you actually have the super sate issue, the following will reproduce:
    Ok, I am doing this as I type it:
    Open chrome (to view this website), then Notepad, then Calculator, (could be any windows, but for the purpose of demonstration, follow along with me)
    The windows should function normally, overlap your windows so that you can see the edge of all windows and the Z-order is (from front to back):the browser on top, then the calculator, then Notepad (you should be able to see part of the background windows).
    Now, with the browser on top, press win+d, then win+d again.
    Click on Calculator, then your browser, your browser is now stuck in the foreground. Clicking on notepad will bring the focus to notepad, and it will be in front of the calculator, yet it will stay behind the browser, as your browser is in "super state". (many
    arrangements of switching focus after returning from win+d will create the problem, with the exeption of clicking the desktop, I also noticed that I could not get calculator into super state unless it overlapped my chrome browser).
    Again, this does not seem to work until at least one of your windows is affected. We do not know how to get the initial window, only subsequent ones.
    I will post back if I find anything else.
    Let me know if there is anything that develops.

Maybe you are looking for

  • Writing FOP output to BLOB

    Hi Experts ! i am using Apache FOP to generate PDF from xml. I am able to generate PDF file from the xml by using fol code :- public void convertXML2PDF(File xmlfile, File xsltfile, File pdffile) throws IOException, TransformerException {      //Outp

  • [AS][IDCS3] PDF Export Preferences Color Conversion setting

    I want to set the field of Color Conversion (as equivalent to manual setting under Output>Color>Color Conversion) to "No Color Conversion" in Applescript but couldn't figure it out. My skeleton Applescript is as follow:- tell application "Adobe InDes

  • Bookmarks show but will not open help!

    We have to open online texbook and the bookmarks won't open went to chrome plugin and disabled chrome and enabled adobe and the bookmarks will expand but will not open, the website informed me on process, but can still only see front page of the book

  • Downloaded "Yes Man"but it has not shown up

    I downloaded "Yes Man"the film from itunes however it does not say if it is downloading and there is no purchase history neither:S.

  • Help with symbian belle widgets

    I have installed some third party transparent widgets that replaced my old widgets, I tried to revert to the old original widgets but I can't, I removed the installation and I got the widget no more existing, I tried installing some widget from a lea