I'm porting an application from windows Pocket PC2003 to Windows Mobile 6.5.
On startup my application shows a PropertySheet with two Pages which I want
to show in full screen mode.
The problem is this:
What ever I do the Taskbar and the menubar will never disapear. Windows Button,
SIP-Button and all other Buttons stay in foreground.
I tried this:
CPropertySheet::OnInitDialog();
// Call SHInitDialog with flags for full screen.
SHINITDLGINFO shidi;
shidi.dwMask = SHIDIM_FLAGS;
shidi.dwFlags = SHIDIF_FULLSCREENNOMENUBAR;
shidi.hDlg = m_hWnd;
::SHInitDialog(&shidi);
// SHFullScreen fails if dialog box is not foreground.
SetForegroundWindow();
SHFullScreen(m_hWnd, SHFS_HIDESIPBUTTON | SHFS_HIDETASKBAR | SHFS_HIDESTARTICON);
and in normal dialogs it will work with
m_bFullScreen = FALSE;
on top but m_bFullScreen is not available for CPropertySheet.
Has anyone any solution for this problem?
Related
Background
We are building a cross-platform application with "popup" reminders, they are custom windows/dialogs which uses QWidget.setWindowFlags like this:
self.setWindowFlags(
QtCore.Qt.Dialog
| QtCore.Qt.WindowStaysOnTopHint
| QtCore.Qt.FramelessWindowHint
)
These popups show up on the systems we have tested (MacOS, Lubuntu (LXDE)), even when we switch between different virtual desktops the dialogs are still shown in the current desktop. However:
Problem
When the user is in fullscreen mode on MacOS (Sierra 10.12.6) the dialog instead is shown in the last virtual desktop that was used
Question
How can we show our "popup" dialogs to the user even when the user is in fullscreen mode on MacOS?
The short answer is that you can't and neither can any other app.
Here's why.
The idea is that when you select the fullscreen view for an app, you want to focus exclusively on that app, to the exclusion of all others. So the app not only expands to fill the entire screen, it removes the menu bar and creates its own desktop space.
You can see how this works using Mission Control (by default, swipe up with 3 fingers). You will see all the apps and all the desktops across all your monitors. Next, set an app to full screen and swipe up again. You'll see that the app has a dedicated desktop (which I believe doesn't even have wallpaper).
The bottom line is that macOS fullscreen view does not support pop-ups.
win.flashFrame() makes tray icon flash until the icon is clicked and the app window is back in the focus again (on Windows 10)
However, if the app is minimized, the flashing ends automatically after just a couple of seconds without even clicking on the icon.
How can I prevent this?
If the window is minimized the user won't see the window flash, you will need to use the win.setProgressBar funciton. This will make a loading bar behind the icon in the tray, you can also set the mode of the progress bar to indeterminate and set the progress to 100% and it will flash yellow/orange. This is a general standard used by lots of applications to get a users attention when the app is minimized.
win.setProgressBar(1, {
mode: "indeterminate"
});
I am developing an Mac OS app, and have preference window presented as model. This works just fine as I want and I don't want to change that behaviour. The problem is: when the window is shown, and I debug on some breakpoints, the preference window is still there, however, Xcode's app is in focused now, but the preference window from the current app still shows on top. This is annoying. I have to drag it to somewhere to see the Xcode window. Is there anything that I can do so that if the app is in debug mode, then that preference window should also be gone away with my app in background and just Xcode is in foreground?
When a window is run as a modal window, its window level is set to NSModalPanelWindowLevel, which is above normal windows. As a hack just for debugging, you could do something like this just before running the window as modal:
dispatch_async(dispatch_get_main_queue(), ^{
NSApp.modalWindow.level = NSNormalWindowLevel;
});
Another approach would be to just run your app on a separate desktop space from Xcode.
I am writing an Windows Phone 7.5 app.
How can I expand the system tray by c# code?
I want that by app shows the system tray with the battery status if the user clicks on a specific button.
If the user taps on the clock then normally WP7 expands the system tray and shows the icon for the battery status in system tray. This I would like to do programmatically on an specific actions.
For example the IE does it too: if you click on "..." then the system tray with the battery status icon will be shown.
Is there a possibility to realize this in C#?
If you want to show the full System Tray you need to call SystemTray.IsVisible whenever the state is changed from IsVisible=false to IsVisible=true you should get a similar animation to what you saw in IE. The tray will auto hide, as is common in WP, after a short duration.
Keep in mind, it isn't recommended under Metro guidelines.
private void Foo()
{
SystemTray.IsVisible = true;
}
I've uploaded a VS2010 project at the below location. This test app should be run once you have a full screen application running. As soon as its running, you have 2 seconds to click back on your fullscreen application. It creates 2 modeless dialog boxes using the full screen application (which should be the last window to have focus) as the owner of the dialog boxes. One dialog is displayed, hidden, the second dialog is displayed, hidden and then the first dialog is displayed again in a cycle. What I find is that when the first dialog box is displayed for the second time, the taskbar pops up. I've spent 4 painful days trying to understand whats going on here and I am desperate for some help.
I received some help which suggested that when I call DestroyWindow to hide the dialogs, Windows would put focus "somewhere" - and in my case the taskbar. Previously when I asked this question I wasn't using the full screen application as the Owner of my windows. I would have thought that the focus should go back to the owner window? I have also tried calling SetFocus() and SetForegroundWindow() on the full screen application prior to calling DestroyWindow on my dialog - but the seems to cause the taskbar to appear everytime and I don't want that at all.
Please help!
Sample VS2010 Project