How can I detect if ANY popup windows are showing

I have implemented a couple of JInternalFrames which can be closed by pressing the escape key, however, inside these frames different parts of the code will sometimes show JPopupMenus and they too should be closable by pressing the escape key.
Thus, I need to close my frames when the user presses escape but only if no popups are showing. For instance, if the user right clicks in my frame to show a popup, then the first time he or she presses escape the popup will close, and the second time the frame itself will close.
What I am looking for is a generic approach to this, that would make it possible for me to detect if any popup windows are currently visible and only if that is not the case I will proceed and close the frame.
I have been giving this some thought but I have not yet come up with a good solution to this. Has anyone implemented something like this or does anyone have any suggestions? Is there a preferred way to get all popups of a frame, dialog, window or the like?
Thanks
Randahl

I also ran into this issue. The previous post can be solved easily by the new event structures, but I need to check if a panel is the frontmost in windows as well.
The FP.Is frontmost property returns if a panel is the frontmost Vi within Labview but not if Labview is the frontmost window in windows.
I ran into this as I am making some stuff to use the scollwheel.
As an example I have added two Vi's. Just load & run these, as long as Labview is active this works. But I would like to have something that switches the lights off when I select another Windows application.
I (think I) cannot use the USER32.dll API as I reconstruct a reference to the 'owner vi' using a control reference.
Anyone has some experience with this??
Attachments:
Vi-a.vi ‏7 KB
Vi-b.vi ‏7 KB

Similar Messages

  • How can this happen? Quantity Field values are showing doubles in ODS

    Hello BW Gurus,
    I have a staging ODS, on top of it a reporting ODS and a cube. I have loaded the data from flatfile to the staging ODS which looks perfectly fine but coming to the Reporting ODS and the cube, the values in quantity field are doubled. If it was just cube where the values were doubled then I might have thought it could be due to double time loading or may be because of duplicate records. But I can see the Quantity values doubled in reporting ODS (which has Overwrite option).
    Does anyone has any clues? when we had this issue couple of days back - I have deleted the request from Reporting ODS and Cube and re-loaded it which looked perfectly fine.
    But today our issue is back - is it not strange?
    help me if you have any thoughts and thanks so much,
    Swathi.

    Hello Dinesh and Vikash,
    My issue has taken a twist and here is the new problem:
    on Friday the report was fine
    on Saturday the report was fine
    on Sunday we had problems with Reporting ODS as it was  showing all double values. (I cleaned the reporting ODS and Cube and reloaded the data) after that the report worked fine.
    on Monday the report was fine
    on Tuesday again we got duplicate values (for few plants) now in staging ODS as well, which has completely with 'overwrite' option with one to one mapping with no routines.
    I loaded the same file in DEV. and this was working fine?
    I debugged the code that was fine too.
    I think this is a strange Issue.
    Please let me know your ideas,
    Thanks so much,
    Swathi

  • How can i detect the windows version

    Hi,
    How can I detect the windows version from Forms 6i?
    I was used get_application_property(operating_system); But it only return MSWINDOWS, MSWINDOWS32, WIN32COMMON.
    Any function or way can return the exact windows version(98/ME/NT/XP)?
    Regards, Wing

    You may use Win_Api_Environment API call to get windows version.
    I have sample code on my home PC if you need code send mail at [email protected]

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How can we detect a virus on our mac?, How can we detect a virus on our mac?

    We think we may have a virus from the USPS spam email.  How can we detect a virus on our computer?

    What makes you think there is a "virus"?  Any symptoms...?
    There are other types of malware (such as trojans) that can affect Mac OS X, but no viruses.  A trojan would have to trick you into installing something (the malware) by making you think it is something else.  You would be notified (by the system) that you are running a downloaded application for the first time, AND if something will be done to update your current system, you will be asked to authenticate (with your admin user name and password).  If something like that comes up when you don't expect it, you should be suspicious (and NOT authenticate).  Just opening an email won't do anything, even if it's an email that may affects Windows PCs.
    This free utility can scan your Mac for malware. 
    http://www.clamxav.com/
    Apparently, there is a version on the Mac App Store.
    http://search.itunes.apple.com/WebObjects/MZContentLink.woa/wa/link?path=mac%2fC lamXav
    In the past, when I bothered to run it a few times a year, the only things it found were junk emails that I had not bothered to delete with embedded malware, all of it aimed at Windows PCs.

  • How can I detect a dialog and respond?

    I'm having trouble doing something that's probably not that hard. I'm trying to "Print to PDF" a bunch of old AppleWorks documents. When you open a document created in AppleWorks v6 it opens right up, but when you open a document created in AppleWorks 5 you get a dialog box that says, "This document was created by a previous version of AppleWorks. A copy will be opened and "[v6.0]" will be added to the filename."
    Right now I open the file and then:
    tell application "AppleWorks 6"
            activate
            repeat while not (exists front document)
                    delay .2
            end repeat
    end tell
    When the dialog box pops up, there's no front document so the whole thing freezes until you hit OK. How can I detect this dialog box and dismiss it?
    Thanks
    PS
    When the box is open I ran this and got this result:
    /usr/bin/osascript -e 'tell application "System Events" to get properties of windows of application process "AppleWorks 6"'
    minimum value:missing value, orientation:missing value, position:436, 153, class:window, role description:dialog, accessibility description:missing value, focused:missing value, title:missing value, size:412, 123, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXDialog, selected:missing value, name:missing value, description:dialog, minimum value:missing value, orientation:missing value, position:8, 76, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Starting Points, size:631, 189, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Starting Points, description:floating window, minimum value:missing value, orientation:missing value, position:4, 22, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Button Bar, size:612, 51, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Button Bar, description:floating window

    Hi,
    The simplest would be to set the application preferences in the script.
    Like this :
    -- *** set prefs ****
    tell application "AppleWorks 6"
          activate
          set oldPrefs to its preferences
          copy oldPrefs to tPrefs
          tell tPrefs
                set old version warning to false --doesn't show the old version warning alert  
                set converted file suffix to true -- append “[v6.0]” to documents converted from older formats
                set locked file warning to false
                set paint reduction warning to false
          end tell
          set preferences to tPrefs
    end tell
    -- *** end set prefs ****
    --**** your script, example ***
    set tfiles to choose file with multiple selections allowed
    tell application "AppleWorks 6"
          repeat with i in tfiles
                open i
                tell front document
                      -- do something
                end tell
          end repeat
    end tell
    --**** end  your script ***
    -- *** reset prefs ****
    tell application "AppleWorks 6" to set preferences to oldPrefs

  • How can i detect if my PC is not on Network..... Urgent Pls Help Soon !!!!!

    Hello Everyone,
    We all know whenever we try to connect to a PC which is not on network, we get UnKnownHostException etc..... by which we can detect that the corresponding PC is not an network(intranet/internet)
    But when i send a msg from my PC to my PC, it works fine even if the network is down. I hv provided my PC's IP address instead of using localhost or 127.0.0.1 which reduces the possibility that the msg will not be traversed thru the network.
    Any IDEA how this works.
    Is There any possible way by which i can detect that my PC is not on network or the PC to which i'm trying to connect is not on network .......
    Pls help me out, its really urgent as to be implemented in my Project
    Thanks In Advance
    Sahil Shaikh

    Hello Surtee
    I have developed a Messeging Service for the eCRM Apllication my company is developing and we r in the final stage of debugging.
    Now whenever a user sends a msg to a PC which is not on network, the messaging service automatically sends an Offline mssg to that PC. But know i want ot distinguish wheather the PC to which i'm sending the msg is not on network or am I not on network based on this i need to perform diff. actions, hence i wanted to know that how can i detect .......
    Pls see if u canhelp me out ......
    Thanks
    Sahil Shaikh

  • How to stop the Company Code popup window in MIRO!

    Hi,
    When User logs in the system and enters into the MIRO transaction, he is asked to enter the Company Code first in order to proceed further. I know that once you enter the company code then the system does not ask it to enter again during that login, however, it will asks again whenever User login the system again!
    Can someone tell that how to stop this Company Code popup window in MIRO, so that the system should not ask for the Comp Code whenever User logs in and enters into MIRO? I think there are some entries maintained in the User Master for this!
    Thanks.

    Hi,
    It is Necessary for the user to enter the company code for which he need to process the Invoice.
    First think is if the user knows ,that he is only going to do for one company code.then
    in the T code SU3.
    In the parameter TAB
    you can make the Default value for the parameter ID BUK as your Comany Code value ( Eg 1000)
    so that when ever the user does the MIRO ,it comes with that company code only.
    and if he want to do for another comapany code ,he has to use the option of Switching the comapny code.
    so this is user dependent and has to be made for all users.
    Note .the above setting works only you have entered saved and logged off and log in again.
    also ,this value gets defaulted you all the comapny codes in all screen.
    Hope so it helps.
    Regards
    Anjanna.

  • I keep getting the an Alexa Sparky pop-up each time I open Firefox, it does not provide a "no" option... how can I permanently stop the popup?

    Every time I open Firefox, I get a pop-up asking me to install the Alexa Sparky toolbar--which I do not want. The pop-up box does not offer an option to say "no" or "do not ask me again", which is VERY annoying. How can I permanently stop the popup?

    '''This worked for me:'''
    How to disable extensions, Personas, and plugins
    Disabling an add-on will turn it off without removing it:
    At the top of the Firefox window, click on the Firefox button (Tools menu in Windows XP), and then click Add-ons. The Add-ons Manager tab will open.
    In the Add-ons Manager tab, select the Extensions or Appearance or Plugins panel.
    Select the add-on you wish to disable.
    Click the Disable button.
    Click Restart now if it pops up. Your tabs will be saved and restored after the restart.
    To re-enable the add-on, find it in the list of Add-ons and click Enable, then restart Firefox.

  • How to create a popup window that shows detail information when press submi

    hi,all
    how to create a popup window that shows detail information when press the submit button ?I mean,when I press the button "Sumit"there will appear a popup window that shows the detail information you typed before.it means are u sure to submit,it is like some confirmation window.
    how to do achieve this ?help plz .
    best regards
    hlee
    Edited by: hlee on 2011-4-15 上午1:26

    hey,vee
    thanks for your response,but i had already read this thread before i put up a new question.any way,thanks.
    best regards
    hlee

  • How can i transfer movies from my windows laptop to ipad 3

    how can i transfer movies from my windows laptop to ipad 3

    Import them into iTunes then sync them to your iPad

  • HT5219 How can i get the Apple Thunderolt display to show Windows 7 i run on my system using Paralells desktop..

    How can i get the Apple Thunderolt display to show Windows 7 i run on my system using Paralells desktop..

    You may need to set the slider at the upper-right corner of the Control window to something other than the extreme left-most position:
    Hope this helps.

  • How can I detect a certain text within a field within CASE using IF

    Dear all,
    for a transformation / generation of values receiving from R/3 into BW I try to
    manupulate three fields. I have a problem detecting a string in a field.
    I am using a CASE with several WHEN clauses on one field. Depending on the
    value, an IF is integrated. There I look into another field evaluating, if it contains
    a certain string. E.g. IF STRING CP 'xyz' OR 'abc'.
    System gives error for the locigal expression. I also tried CS, but same error.
    How can I detect a certain text within a field and which is the right logical
    expression.
    Many thanks in advance!!!
    Claudia

    Hi,
    Folow the blow example...
    May be it helps....
    DATA: hex1 TYPE string,
          hex2 TYPE string.
    hex1 = 'FFFF'.
    hex2 = '123FF'.
    IF hex1 CP hex2.
    ENDIF.
    Cheers,
    SImha.

  • HT1338 How can i use my data on windows or mac when i use one of them in the same time?

    Hi,
    i have a Mac book with 2 operating system, ( Windows& mac). How can i use my data on windows or mac when i use one of them in the same time?
    Thank you

    The following article(s) may help you.
    Resolving duplicate calendars
    Resolving duplicate contacts

  • How can I download itunes from my windows vista to my ipod original?

    How can I download itunes from my windows vista to my ipod classic?

    If you want to add songs from iTunes to the iPod, plug it into the computer, select the iPod in iTunes and click the tabs across top to select what you want on the iPod.

Maybe you are looking for

  • Ipod is not recognized by computer or itunes and does not charge

    Hi, so for a few months I've been having a problem with my iPod Touch 4th gen where when i connect the ipod to the computer it does not connect. My Computer says "USB device not recognized" and also I've recognized that my ipod doesnt charge either.

  • SAP won't start after recabeling sap system

    Hi,<br> <br> I have recently recabled my sap system (from wireless to wired) and now my sap instance won't start anymore. The weird thing is that nothing major was changed. When i read the logs from the work directory it seems it cannot load dbsdbsli

  • Customizing request screen not popping up while saving

    Hi I have created a company and saved. but while saving no customizing request screen popped up. Does any one know the reason behind it and also let me know if any settings to be done to get the customizing request screen pop up. with regards Ramesh

  • Where is the list of previous shoot names stored?

    4 times (in the last 2 versions), LR has lost most (but not all) its non catalog-specific user data after a program halt.  The list of shoot names is now empty, as are several other things.  LR appears to have reset itself to a new install state. "Re

  • Motif libraries for Suse 6.2

    My Oracle developer 6i for Linux will not install on Suse 6.2 because I am missing some Motif libraries. libXm.a and some others. Has anyone installed the developer 6i on Suse If so perhaps you could help me get the Motif libraries. Any help is appre