Focus-Grabbing Window

Hi,
I have an SDK 7.0.5 plug-in that displays PDFs in my own C# window through COM.  When I call AVDocOpenFromASFileWithParams, the control I used to select the file loses focus.  After the PDF finishes loading (which can obviously take a while if the file is large), focus is returned to my control.  Is there a single-threaded way I can prevent the control from ever losing focus?
Thanks,
Daniel Sheiner

We create the "hidden window" as follows in C#:
     System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
     startInfo.CreateNoWindow = true;
     startInfo.FileName = path;
     startInfo.Arguments = "/n";
     startInfo.WindowStyle = ProcessWindowStyle.Minimized;
     _acrobat = System.Diagnostics.Process.Start(startInfo);
    NativeMethods.ShowWindow(_acrobat.MainWindowHandle, 0);
where path is the path to Acrobat.exe, and NativeMethods.ShowWindow is defined via DllImport from User32.dll.
Through COM, we pass our plug in the handle for our browser.  We open the PDF with AVDocOpenFromASFileWithParams.  The AVDocOpenParams we pass in has its serverCreationData set to an ExternalDocServerCreationData with its platformWindow set to the handle for our browser.

Similar Messages

  • How do you disable OS X (when you focus on a window) from auto-focusing on windows from the same (or similar) program on another screen

    Hi,
    I have what is quickly becoming a major nuisance, I hope someone here knows more than me (hopefully about to change this behaviour..?).
    Whenever I click on e.g. excel on one screen, the excel windows in the background on my other screen is automatically brough to the front, hiding the window I actually want to be able to see. And if I have no excel windows on that screen, it will automatically bring e.g. MS word to the front instead.
    Does anyone know of a way to disable this extremely annoying behaviour? It seems silly to have to minimize every single window (yes, I have a lot open at any given time, and need to transfer data between several different programs) just to be able to look at windows from two different programs at the same time.
    Cheers,
    W

    this is NOT how apps behave on a Windows PC. There, the different windows of any app focus independently.
    Mmm, no, not really. All Windows apps run inside an application frame. Nothing for that app can exist outside the frame. Once you are in the frame of a given app, all of (example) Excel's open documents are also stuck inside the frame. Along with any palettes or other objects for that app. You can take it off full screen display like below, but each app, and everything associated with it is in its own frame.
    I mention this to show that you can do the same thing on your Mac. Where you said:
    I'm clicking/highlighting to the foreground (this also applies if I use alt+tab in Windows PC; you cycle through every single excel you have open,
    The equivalent on the Mac is to press Command+` (same key as the tilde ~, which should be directly above the Tab key). So it's Command+Tab to switch between apps, and Command+` to rotate between open documents within an app.
    So anyway, in the same manner you would arrange your Windows apps as shown above so you can see the contents of both apps, you simply arrange your Mac apps' documents the same way. Adjust the size of each open document as necessary so you can see the relevant information.
    Just like if a person were going from Mac to Windows, it's "different". Folders, files and apps? All the same concept. Saving and deleting files? Pretty much the same. But if you're very used to one, the other seems odd until the need to think about "simple" steps that aren't performed quite the same way as the OS you're used to becomes habit, and it no longer seems odd anymore.

  • Change and set Focus of window

    HI
    Guys
    I have encountered a problem while setting focus of my application's windows.
    i found the way i.e. by
    public void windowGainedFocus(WindowEvent wgf) {          
              if(this.isActive()){
                   VWM.theVWMDetailWindow.setAlwaysOnTop(true);
                   System.out.println(wgf.getSource());
         }by doing that there is errors came.....
    but there is no effect on the window theVWMDetailWindow to have operation setAlwaysOnTop successfully functoned
    Please help me out
    Thanks

    HI
    Yannix
    actually , i want to get the focus of my application window
    and then perform the action on it..
    The case is that::
    I have a main window..then on it a menu bar...
    when i click on one of the menu option then another separate window will be opened....and many other windows on different menu options....
    SO now i want to control their focus..... rite
    when my main window's focus lost means if i select another application
    another related opened window's must also lost their focus at that time.and when i came back to the main window another window's already opened must be on top.....
    So could you please suggest me some way , some solution to solve this
    Thanks

  • XMonad scratchpad focusing wrong window

    In Xmonad, when I hide a scratchpad window using my designated hotkey, the focus does not return to the previous window, but to whatever window that has a lower position in the stackset (I think); this is an annoying problem, especially when I'm in the full screen layout.
    Anyone experiencing the same problem or has come up with a fix?

    Now I think more about it, some sort of ordering on the stackset such that whenever a window is closed then the most recently used window is focused should just do it..

  • Focusing a window and removing from app bar

    I am using snoozesoft systray4j to have my application have a systemtray icon.
    I want that when I minimize the application it goes away from the application bar and when I click on a button on the systemtray it focus the entire window.
    So I would like to know if is possible to remove (and the add again) the application from the app bar...
    About the focusing I am talking of the complete window focus, is it possible?

    You're welcome. Glad I could help.
    Thanks for the and Aloha from Big Island.
    iMac G5 Rev C 20" 2.5gb RAM 250 gb HD/iBook G4 1.33 ghz 1.5gb RAM 40 gb HD   Mac OS X (10.4.8)   LaCie 160gb d2 HD Canon i960 printer

  • How to determine which application has focus in Windows

    Hello all-
    I'm trying to work around the "Labview freezes when there is large data on the clipboard known issue" (http://forums.ni.com/t5/LabVIEW/Labview-freeze-when-accessing-a-custom-menu-with-data-on-the/m-p/200...) and one thought is to try to determine if Labview has focus, and if it does then clear the clipboard.  If Labview doesn't have focus, then let the user use the clipboard.  This would be a good work-around because it would let the users paste screen shots and such into notes files and wouldn't risk a nasty clipboard/ menu/ freeze-crash.
    My initial search for determining windows application focus, came up empty though.  This old thread (from 2005) pretty much covers it:
    http://forums.ni.com/t5/LabVIEW/Is-there-a-simple-way-to-programatically-tell-which-VI-window/m-p/20...
    The "Is Frontmost' property does not do it.  I need to determine if Labview has focus, as opposed to Windows, notepad, firefox, etc.  I also reviewed the commad prompt commands and didn't find anything immediately helpful there either.
    Any ideas?
    Thanks,
    Casey
    Solved!
    Go to Solution.

    Christian-
    That's perfect!  By using GetForegroundWindow, GetWindowTextA and GetWindowFileNameA in user32.dll I can detect which window has focus.  If Labview has focus then I programatically clear the clipboard so the user can still use it when not clicking on Labview windowns, but also we do not risk a freeze and crash because of the clipboard/ freeze bug.
    I briefly thought about using the .NET versions of these functions, but because that would have forced an upgrade to at least .NET framework 3.0 for all of my user computers, I decided on the unmanaged user32.dll.
    Thanks for the suggestion.  I think I'm pretty close to a work around here that should last me until they fix the clipboard/ freeze bug.
    Thanks,
    Casey

  • Activate - set focus on window no2

    I have opened a new window(no2) from my main window(no1). The both windows have lost focus and is behind another programwindow.
    If I then want to set focus on the mainwindow(no1) by clicking the tray icon I also want window (no2) to get focus and become visible.
    How do I do this?

    Hi Juli,
    My code edit text is in the first position. I am desperately trying to test Alexey's way of doing it, but SBO keeps on falling over.
    Alexey, should I do it when BeforeAction = False and ItemEvent = FORM_LOAD? UI Server shuts down here when I try to get the active form. Can I get active form at this point? Is the form already active.  I am trying different combinations, will let you know.
    As soon as I put something in the FORM_LOAD my add-on crashes. Is there something happening that I don't know of? My Code is for example:
    Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD
    oApplication.MessageBox("Load")
    Before "Load" message the UI server shuts down and I get the load message exactly 100 times???
    Must be something stupid I'm doing
    Thanks,
    Adele
    Message was edited by: Adele le Roux

  • Giving Focus to Window/Frame

    Hi
    I am unable to give focus to newly opened window/frame
    How can I do it? A quick reply would be appreciated as I need it urgently
    Thanx in advance
    jods

    When you initialize the Window/Frame set it to focusable with setFocusable(true) and then simply call requestFocus()

  • Grab windows username?

    Is is possible to grab the currently logged in user's username from windows and store that name in a variable to run logic against?
    Please advise. I thought the documentation was unclear.
    Bret

    > I think what you're looking is identity.loginName
    Which is what Bernd mentioned, but as I mentioned this property is security restricted and can only be read from a folder-level method. You cannot directly access identity.loginName from a document-level script.

  • Firefox steals focus when window is minimized

    It looks like this issue is being ignored/overlooked or shuffled to the bottom of the pile. However, this is the single most annoying issue I have EVER had with Fx.
    Since upgrade to Fx 6, and now 7, Fx will steal focus after being minimized. Doesn't matter what I'm doing, or the app I'm working with, or the add-ons (tried it in safe mode), it regularly (a minute or so) will open and steal focus.
    I've tried using Tweak to prevent apps from stealing focus, tweaked registry settings, and it STILL does it. On a side note, Fx6 was buggier than shit. I fresh installed 7 and its better, but this focus crap has got to stop.
    Please look into this issue, Im not the only one.
    Edit: And it doesn't rely on the web page I'm on. It will do it with the about:blank page.

    I agree this is a complete PITA and is just about to make me change browsers.
    On a dual monitor setup, if I have (for example) my email software on the right screen; and wish to attach photos, picking them out using Windows Explorer (not *Internet* Explorer) on the left screen, any time I click on the left screen, the window containing the email program collapses and the right screen reverts to (I guess) a browser window that Firefox thinks is "more important" than the one I was just working in.
    When I click on the left screen, it should have NO EFFECT on the right screen, and vice versa. If it does, the idea of having the real estate of two screens to work on goes to hell.
    Likewise, if I have Excel running on one screen and a stock charting program running on the other screen, any time I click on the Excel, the stock charting screen collapses and goes to (I guess) a screen (of another open browser window) that Firefox thinks is "more important" than the last thing I was working on.
    I have had this exact setup for about 2 years and it has worked fine. Recently, Firefox upgraded, of course, and I replaced the hard drive.
    If you can't fix this organically, then why not include a feature that would "pin" a given window as "always on top"? Of course, that would cause other problems but it would at least make the browser work the way it should.
    Clicking on one screen should NEVER affect what happens on the other screen! Period!

  • Focus-stealing  Windows in Photoshop CS4

    Hello again,
    since PS CS4 came out I have worked quite a bit with it. The thing that bugs me the most is the new window-behaviour.
    I have to ad, that I work on a Windows/Intel/PC-Workstation and I am not used to flying windows...
    In older versions of Photoshop a window in the workspace was not able to cover palettes. This has changed with CS4 and it is driving me crazy.
    Is there any way to change the window-behaviour back to were it was in Version CS3?
    I would rather have the new behaviour as an option than a given feature.

    Found it, under preferences its 'zoom resizes window', what a stupid feature!

  • Changing focus of windows without mouse click (X-mouse)

    X-mouse allows you to, with mouseover, activate and use windows without having to draw them to the front. So you can, for example, hover your cursor over a window that's only partially visible type to it without it coming to the front. It was one of my favorite add-ons in Windows (I used TweakUI to activate it).
    However, despite looking long and hard, I have not seen anything remotely like it available for Mac. I know that the capability exists, because occasionally it works automatically (for example within the Finder).
    Has anyone found a way to do this in Leopard?

    Thanks for the tips; I did know about them and use them frequently.
    My problem is that often I like to keep track of multiple windows, and it's just annoying to be shuffling through them all the time -- one is often just a background window that I want to type things into time and again.
    Well, I suppose I should write to feedback sometime.

  • Dreamweaver pop-ups messages don't regain focus on Windows 7

    For exemple, when I put some files for upload some times DW opens a pop-up for some confirmation. If I change to another program, when I come back to Dreamweaver I can't acess that pop-up, and DW blocks me from clicking on anything else. I use some malabarism to view the pop-up, but normaly I have to wait the pop-up timer expires to continue to use DW. I belive that is a Windows 7 only problem.
    If I try to catch the pop-up on the new Aero Windows taskbar it only opens DW main window, not the pop-up!
    Someone has any ideas?

    Thank you for your anser, let's try this:
    1. Delete a file on the remote server.
    2. While the delete prompt is showing, I switched to another application.
    3. Go back to DW using the thumbnail on Windows 7 taskbar. (it shows two windows, but it doesn't make diference).
    4. The remove file confirm dialog is not visible, and it's very dificult to show it back, normaly right click-n-hold on thumb and drag cursor so you can use the confirm dialog.
    Testing I discoverd that when the prompt is there you can make it disapear simply by clicking on W7 thumb on taskbar. To show it back I have to use my malabarism right-drag click.
    (I'm using W7 64bit with DW CS5. Sorry, I may committed some English errors)

  • Dialog focus in Windows/NT

    When a user opens up a dialog window in my java app, and then switches to some other program (dialog still open) and then switches back to the original java app, the dialog frame is now 'behind' the main application's frame.
    The dialog frame does not appear in the system bar, nor can it be accessed using alt-tab. The only way to get to it is to close down the windows of the running apps until you find it again.
    How can I get around this??

    You might try passing in the parent frame/dialog as the first parameter in your JDialogs constructor.

  • Mouse on imac double clicking on single click, not grabbing windows, etc...

    My older iMac (with failing video card, etc) exhibits this weird mouse behavior. I'm using a standard issue clear plastic single button "Pro Mouse" connected to the keyboard via usb. The Double Click speed is set all the way to very slow in Preferences, but still, a single click on something acts as a double click. The mouse will also give me a hard time about grabbing things to drag them around- Its super annoying. I can't click and hold and move something a lot of the time, and clicking and holding will also act as a double click and open what I am trying to move (say an application in the folder I want to pull to the dock, it will open the program rather than allow me to pull to dock.... etc.)
    Any ideas?

    another example:
    I'll have an email highlighted in Mail and click delete and it will delete 2 emails with one click...
    super frikkin annoying. Double click speed is all the way down to slow.

Maybe you are looking for

  • Significant of key field in Info cube table

    Hi, what is significant of key field in Info cube table? Best regards, dushyant.

  • Outlook keep propmt for login username & password although have entered correctly

    Need assistance on MS Exchange 2000 & MS Outlook 2007. For your information, one of our users facing issue in connecting MS Outlook 2007 to MS Exchange Server 2000, whereby the system keep requesting login password although user have entered login us

  • How to fetch data

    I Have below mention data, COL_VAL COL_DT 1111 19/02/09 2222 20/02/09 3333 21/02/09 4444 23/02/09 5555 24/02/09 6666 25/02/09 7777 26/02/09 8888 27/02/09 9999 28/02/09 1234 01/03/09 5678 02/03/09 I want to find the data for col_dt basis like it shud

  • Change requestor and goods recipient for PO's in SRM

    We have an issue where we want to change the Requestor and goods recipient for PO's in SRM as the requestor is leaving the organization. Do we have any way possible to change the Requestor adn goods recipient for SRM PO's? I have found bbp_crr, but i

  • Installation of weblogic 6.1 suuenly aborts without giving any error

    Hi i am trying to install weblogic server 6.1 in the following configured machine:-500 Mhz 256 MB RAM 40 GB harddisk with WIN NT workstation as the operating system.The installation aborts without giving any error ?? please help..it extracts 100% and