Why does the task bar appear when I display a self-drawn modeless dialog? .. sometimes? - dialog

I have an interesting (but frustraring) problem. I have an application which uses the full screen (this is meant to simulate a third-party fullscreen POS application).
My application displays a sequence of modeless dialog boxes on top of the full screen application. It shows one, hides it, then shows the next, hides it etc. After the 3rd show, the Windows taskbar appears about 1 second later. I can't figure out why.
I've stripped my code right back to see if its something I'm doing in my OnNcActivate handler (which I use to draw my skinned window) but I don't think it is as the problem appears to be timing related. I've tried running Spy++ as well as dumping messages in m WindowProc myself and I still can't see anything odd that would give me any clues.
There are some messages with ID 0x36e in my logs but I can't find out what they are supposed to be. I've checked various message ID lists and can't find them. They shouldn't be any message IDs of my own since WM_USER doesn't start until 0x400.
I know I could get around this problem by auto-hiding the taskbar but I can't ask our customers to configure their taskbars to auto-hide to get round my problem.
Any ideas why the taskbar would appear in relation to my modeless dialog boxes?
EDIT: I completely stripped out my self-drawn GUI code and I still have the same problem. I could be wrong but it would seem that when I call ShowWindow( SW_HIDE) first, Windows tries to activate "another Window" (as it says in MSDN). I think in this case its activating the taskbar rather than the POS application. If on the other hand I open my second window before calling ShowWindow( SW_HIDE ) on the second, then it seems to behave itself.
Cheers
Sparky

Following a long discussion I come to the conclusion that DestroyWindow was not the problem. I found in the end that displaying a dialog.. clicking on the POS, then clicking back on the dialog that sometimes the taskbar would appear. I have spent an entire week trying to find reasons for all of this but to no avail. I thought that assigning the POS window as the owner would solve the problem - it didn't. In the end the solution for my problem was to determine if the taskbar is obscured completely before showing my dialog. If it is, I hide the taskbar for the duration which my dialog is displayed (set its placement to SW_HIDE) and then set it to SW_SHOW when I close my dialog. The task bar doesn't pop up and annoy people anymore. Not a fantastic solution for other peoples' applications perhaps, but perfect for our customers.

Related

Section at bottom of screen that doesn't respond to onpress event, what's causing this?

I'm working on an existing React-Native app, and in the iOS version, there's a problem where a portion of the bottom of the screen does not respond. At first it was thought to be on a specific screen, but upon further investigation, it was found to be affecting other screens as well. The control used on the first screen where the problem was noticed is TouchableOpacity, but a rectangular section in the middle at the bottom of the screen does not respond, but in either corner at the bottom of the screen it does respond. Another screen has a ListView, and if you attempt to scroll from that same bottom middle area, it won't, but everywhere else, it will. This is evident in both the simulator and on the physical device. It acts like there's something in the road floating over the top of everything.
I've tried using the Accessibility Inspector to identify the cause, but this hasn't revealed anything.
The highlighted area in the screenshot above is where I'm referring to.
To complicate things further, this problem doesn't exist in the Android version.
Has anyone experienced this before, and if so, what was the cause and how do I fix it?
Edit: I've now determined the cause is an Animated View that's hanging about, it seems not all the child elements within it are having their opacity set to 0. I've attempted to address this using pointerEvents, but this just moves the problem to a different child element.
Anyone have any suggestions?
The issue turned out to be that the parent was having it's height changed during the show and hide events to avoid this same issue in Android, so we need to only change it if the platform is Android.
this.setState({height: (Platform.OS === 'ios') ? 50: 0});

Why is Excel / Word 2013 starting invisible?

Our Company recently upgraded to Office 2013 since we want to use SharePoint 2013.
We had several issues with the new Office Version but Microsoft has already solved some of them.
Anyways, one thing sitll grinds my gears:
Excel or Word sometimes starts invisible. It is visible in the Taskbar but the window doesnt pop up. I can click on the Icon in the taskbar but it doesn't change anything. The only way i figured out to show the window, is to use [Windows] + [Arrow Keys].
I can't tell the constellation why this is happening but most of the time it is if there isn't already another instance of the program running.
I don't have Office 2013 at home to reconstruct this but I have seen this on different Computers at our Office.
Now does anybody know about this issue?
What can I do about it?
Is it known to Microsoft?
Any help is appreciated.
I don't think that it's invisible, it's just starting off screen somewhere. Perhaps on a second monitor that is no longer there (or moved virtually to the other side). The [Windows] + [Arrows Keys] just moves the window onscreen where you can see it.
Alternatively, you could hover the mouse over the icon on the task bar, right click on the preview window and then select Move (if Move is grayed out, select restore and repeat). Then, hit any [Arrow Key] (this will attach your mouse to the window caption bar) then move your mouse (without clicking anything) until the window shows up on screen.
By doing this you can figure out what side of the screen the application is opening up (not that knowing helps much). Excel should just show up where ever you had it last, but it will not remember it's location if you snap it to the sides or top of the screen (which is what you were doing); It will only remember the Normal View size and position of the window.
My workaround for this bug is to click the Taskbar icon for the new (invisible) window while it's active, which minimizes the window, then click it again to restore it. Then it becomes visible.
I have the same issue, and it's definitely an invisible window, not off-screen (see workaround below).
It only happens in specific circumstances: when opening a second word doc from a sharepoint/office 365 location, the second doc gets a taskbar icon, but no visible content, so the first doc is still visible (but the second doc is invisibly in front of it).
The workaround is to click the minimise button on the first doc. Nothing will appear to happen because it's the invisible second doc window that receives the click event. Then select the icon on the task bar to make it reappear, properly visible.

WinRT XAML - how to fix higlight issues?

When I'm testing my app on a mouse-driven device, I'm seeing a couple of odd highlight issues that I would like to try and resolve.
The first occurs when I call up the app bar, hover the mouse over a button (at which point the button goes grey) and then press Escape to dismiss the app bar. If I then call up the app bar again, the button has stayed grey, even if the mouse isn't over it, and remains in that state until I move the mouse over it and then away again.
I can't immediately see a property of the button that I can reset to clear that state when the app bar gets dismissed.
The other oddity I'm seeing is that sometimes the first item in the list on the page will get a box drawn around it:
This seems to happen when the app bar is being dismissed. I'm guessing that this is because the item is in a particular state that causes the box to appear but I'm not sure what state or how to clear it. The box does not appear during normal use of my app.
Thanks for any clarification or solutions you can provide.
I found a simple way to workaround this issue. In the code for Clicked/Tapped set Visibility of the button:
CreateNewDatabase.Visibility = Visibility.Collapsed;
CreateNewDatabase.Visibility = Visibility.Visible;
It will reset button state to Normal.
Hope this helps!
So, the issue is that the VisualState for the Button is being set to PointedOver, and then not being unset (because your mouse isn't leaving the bounds of the control and therefore triggering a PointerExited event). What this means is that you'll have to manually set the VisualState of the Button if you want it to change in this manner. You could do it on AppBar's Closed event. Basically, do a recursive check of all Children of the Content property of the AppBar using the VisualTreeHelper. Check to see if the Child is a Button. If it is, set its VisualState using VisualStateManager.GoToState().
I've also figured out what was causing the black box around the button - it is to indicate that the button has Focus.
The rather strange thing is that I'm not really sure why that specific button is getting focus or how a user is supposed to give focus to a button without it just randomly happening so, until I figure that out, I've decided to comment out the Focus state support from the Visual Manager XAML used in the default GridView item style.

MonoTouch Dismiss Keyboard (sort of)

I am writing a MonoTouch iOS app. I have read many postings about ResignFirstResponder and I am using that.
My app is a typical table view app. I have done my own custom table cell view. The UITextField controls that cause the numeric keypad to come up in the first place are all on the custom table cell.
Currently I have it so that if you tap on the background of the cell I call ResignFirstResponder on all the text fields. This seems to work, but is not intuitive. I had a new beta tester get it last night and he tapped on one of the text fields and the keypad came up and he was lost as to how to get rid of it. After I told him to just tap the background, he now is fine, but obviously I want a solution that is obvious and doesn't require me to tell everyone how it works.
I read one post about a way to add a DONE button to the keypad, but it looked like a total hack and even broke when 3.2.1 came out and I don't want to have to worry about my app breaking when a new OS comes out.
Suggestions?
I would keep the background click->ResignFirstResponder that you have already, but add to it.
Curious, what button do you have set in the bottom right of the keyboard? There are options to show a Done, Search, Go, Next etc. buttons that can be setup to ResignFirstResponder. Pick the button that makes sense in your situation.
You can hook into the bottom right button by setting a callback to UITextField.ShouldReturn and calling ResignFirstResponder. You can just return false (that return value is for allowing line breaks in your UITextField).
Found an example here of hooking up ShouldReturn.

Components in module disappear when browser is resized (Flex 3)

We have this Flex app built on Builder 3 and we're using SuperTabNavigator from FlexLib to have some modules displayed. The thing is, whenever the user resizes the browser window all the contents on any tabs open simply disappear and there's no way to get them back. This only happens the first time, so if you close these 'broken' tabs and reopen them, you can resize all you want, but you still lost all you were doing in them and this is unacceptable. I've done some testing and found the module in that tab doesn't dispatch the resize events when this happens. It's dispatched when it opens (everything is set to 100% to fit the browser window, so it resizes on startup) and every other time you resize it without 'breaking' it. It gets weirder. I've also found that resizing works perfectly as long as you resize it to a size larger than the original (i.e. you open it in a browser window that is restored and then maximized), but even after doing that, if you change its size back to something even a pixel smaller than the original, the module just disappears. Everything else remains in perfect working conditions: any components outside tabs and the tabs itself work, but (summing up) anything within any tab open at the moment you first resize the browser window to a size smaller than the original just disappears.
I understand that this is a weird problem and hope some of you might be able to help me. Feel free to ask any questions if anything wasn't clear.
Thanks in advance.
I had this exact same problem with my application. The issue stemmed from the fact that the RemovedFromStage event was being fired when the window was sized smaller than its original size. I was catching the RemovedFromStage event and hiding my component, which resulted in this behavior. A more detailed explanation can be found here.

Resources