Focusing Issue in Clarion 6 - clarion

We have an application in Clarion 6 which does not have any mdi windows in it anywhere. These have all been removed and made non-mdi. When this one window is open and other windows are opened off of it (say from a button click), the first window will 'pop out' in front of the other windows when the items are refreshed based on a timer.
How can this be stopped? We do not want this window to get the focus and cover other windows automatically this way. However, the display data does need to refresh every so often.

Related

Excel’s cursor/selection focus after inserting content add-ins

In Excel, I’m having my cursor/selection on a specific cell. Up until a recent Office update, the behavior upon inserting an Office.js-powered “content add-in” was like this:
The add-in is being inserted
The container of the web control is focused (you get the resize handles and Excel reveals the Drawing Tools menu) and the focus on the sheet is lost
getSelectedRange() right now would not yield any results but an error
You need to make at least one click into the web control’s area to de-focus the container and focus both the web control and re-focus the cursor/selection on the sheet
getSelectedRange() works now
After a recent update, I’m using Excel for Office 365 Version 16.0.11328.20362 now. And the behavior changed to this:
The add-in is being inserted — unchanged
The container of the web control is focused and the focus on the sheet is lost — unchanged
getSelectedRange() right now would not yield any results but an error — unchanged
Clicks on the web control don’t change the focus anymore, the container keeps being focused!
While the old behavior was already cumbersome as interaction between the add-in and the sheet was not possible directly after add-in insertion (only after at least one click), now not even the workaround of making that single click in the add-in is working anymore.
My original requirement was to read data from the sheet that has been selected just prior to inserting the add-in (just like it works with the native Excel charts). That’s why I had to come up with this one-click workaround in the first place.
What is now the best (if any) way to work with the workbook/sheet right after inserting the add-in with as few quirks as possible?

How to bring an application to the front with picoe/Eto on Mac OSX?

I want to minimize the main window of a C#/Eto app and switch to another program. But when a timer in the Eto app fires it opens a new window, which I want to see. It should be displayed on top of all other windows currently open. The focus may switch to that window, but it's ok if not.
Using BringToFront() of the Form class does not work.
What else could I do?
Due to the way Apple made OS X, you are unable to make a window go to the top with programming. On Windows it is different.
Good luck!

How is the Windows 10 Game-Bar implemented?

Pressing +G in Windows 10 causes the Xbox Game Bar to open - it overlays the current application, regardless of if it's a game or not (though Windows maintains its own database of games as a hint to show the bar automatically on process startup or not)
I wondered how this is possible - I don't have any Windows 10 Xbox App-related processes running on my computer.
Process Explorer shows that when WinKey+G is pressed, the following happens:
An svchost.exe instance (which is hosting the BrokerInfrastructure, DcomLaunch, LSM, PlugPlay Power, and SystemEventsBroker services) invokes "%windir%\System32\bcastdvr.exe" -ServerName:Windows.Media.Capture.Internal.BroadcastDVRServer
bcastdvr.exe then invokes "C:\Windows\System32\GamePanel.exe {hexString} /eventType=8 (where {hexString} is a 16-hex digit (8 byte) string, presumably a window handle or equivalent).
GamePanel.exe then creates the window.
But the overlay window itself is special - it doesn't seem to be a normal hWnd - for example, I observe that my mouse cursor loses its drop-shadow and the "sonar pulse" effect (when I tap the Ctrl key to show my cursor location) stays in-place where my mouse cursor was when I opened the Game bar. I also noticed how smooth and fluid the game-bar's animations are - quite unlike a typical Win32 window. Is it using the XAML UI framework? If so, how is it doing it outside of the Windows UWP Sandbox?
Curiously, the game-bar is also able to target elevated windows too.
I tried - and failed - to inspect the windows using Spy++ because it disappears as soon as another window gets focus - but when I elected to start recording a window (so you get the recording overlay, which always remains on-screen), the overlay disappeared as soon as I used Spy++'s "Find Window" tool. How is the GameBar Recording Overlay doing this?
So it turns out that after some research, I found out that the gamebar is a .exe file located in C:\Program Files\WindowsApps\Microsoft.XboxGamingOverlay_5.120.4062.0_x64__8wekyb3d8bbwe that is opened with the Win-G shortcut (which can be changed). From what I've seen, when opened, you will not be able to see the gamebar in the apps page of task manager, but rather the background processes page where it is grouped with the runtime broker which makes me believe that it is a program that is loaded by default on boot and built in to the ram of the OS of the device. You can find the properties of the gamebar when you expand the gamebar section in the background processes section then right click the "Xbox Game Bar" and then clicking properties. I think that the transition into the gamebar are smooth because of it potentially being an app built in the RAM and offloaded as a background process by default. The SYSTEM account also has full control of the file which furthers supports the possibility that the Xbox Game Bar is a feature that is pinned on windows ram.

How do I make an Office 2013/2016 application run in separate process on Microsoft Windows?

I am developing a Excel plugin. It works all right for Excel versions before 2013. But a lot of features is broken when it runs against Excel 2013. I found the root cause is all windows are running in only one process in Excel 2013. Even if user explicitly launch a new window by double-clicking the shortcut on the desktop or by clicking the item in the start menu, no new process is created.
This results in the status conflict between processes. Status bar and ribbon is shared. For instance, when I update the status bar information in one window, the other windows' are also updated. When I check/uncheck a ribbon button in one window, the other windows' buttons are also checked/unchecked.
I think a possible solution is to change some configurations to make it work as before. But I found nothing relevant by searching on google.
Does anyone know how to make it or is there any other solution?
With Excel 2013, the default you have is to create a new window within the existing Excel process. In order to force the creation of a separate instance of the Excel process, you have these options:
Option 1
From the command prompt, run EXCEL /X and you will open Excel window as a new instance. The /X command switch forces the creation of a new instance.
Option 2
Right click on the Excel icon in Windows taskbar
Go down to where it lists the application
Hold down the ALT key on the keyboard and click "Excel 2013/2016"
It should give you this prompt, "Do you want to start a new instance of Excel?"
Click "Yes!"
Option 3
Use this technique to open an existing document directly:
Hold down Alt.
Right click Excel file.
Click Open.
Continue holding down Alt until the "Do you want to start a new instance of Excel" dialogue pops up.
Click Yes.
For more detail,please visit:
http://sqlblog.com/blogs/marco_russo/archive/2012/07/24/running-excel-2013-in-a-separate-instance-excel-powerpivot.aspx
re. "Right click on the Excel Tab in Windows taskbar keeping the ALT key pressed"
-This option is not available in Windows 10 with Excel 2016.
However, the Excel /X option works and a second change-undo buffer is created, as noted above, in the new process.

How do I make a window move to the top of other windows in Gnome when that window already has the focus?

I have an application that sends the focus to other windows but those windows then don't automatically display themselves in the foreground, i.e. on top of all the other windows. Where can I configure the preferences of my window manager so that this is the default behaviour?
In particular I'm using the Ctrl-0 and Ctrl-Shft-0 shortcuts in the MATLAB IDE to move between the command window and the editor window and although the focus seems to be transferred the new window doesn't automatically redraw itself in the foreground.
Not sure of a key binding off hand that does it, but if you alt-click on a window (which allows you to drag a window) it should come to the front.
As codeDr suggests, MATLAB is also kind of bad about repainting its windows. If you draw to a figure while code is executing, the figure does not update unless you execute drawnow or have some similar pause in the execution to allow the GUI to repaint. Since we're talking about MATLAB, the figure command will also cause the indicated figure to come to the front (in fact, it's harder to get it to not come to the front). So you could do figure(gcf) to bring the current figure to the front, or save the figure number with h = figure; and then later do figure(h). Incidentally, if you want to switch current figures without switching focus, set(0, 'CurrentFigure', h) should set h to the current figure.
Your window manager (probably Metacity?) implements focus-stealing prevention so that rogue apps don't pop up windows that would disturb your typing. Matlab needs to raise its window, and give it the input focus with the correct timestamp. If this is being done from a KeyPress event handler, the timestamp for setting the input focus would be the timestamp from the KeyPress event (i.e. the timestamp of the user-generated event that caused a window to be raised/focused).
To politely give the input focus to a window, google for _NET_ACTIVE_WINDOW.
Usually when the window doesn't repaint, it means that the application's main application loop isn't running to refresh the window. Could it be that Matlab is doing some computation or disk activity when you are switching between windows?

Resources