How do I detect when modal title bar is done blinking with WndProc? - vb.net

I have a VB.net MDI app that contains a modal window (normal window shown as modal). I have a custom title bar button that disappears if the user clicks outside the modal area.
Normally, clicking off a modal will cause the system to beep and then flash the title bar of the modal window.
I want to know how to detect when the flashing is complete (using WndProc if possible) so I can redraw the custom button.
Anyone know how this could be done? Thanks!

It's been a while, but I believe your window should be receiving a WM_NCPAINT message when the frame needs to repaint.

It turns out that I had the WndProc(m) line in the wrong spot.

Related

How to bring popup to foreground?

I have a dynpro which creates a popup ALV (using a dialog container). A button on the popup will display another popup in the same way. My problem is that the last popup goes into the background, the selection going back to the first popup. Is there any way to fix/control this?

How can we provide default Back key press behaviour to a custom button tap event in Windows Phone 8?

I'm developing an Windows Phone 8 application. In a page i have placed one Button and one textbox. When user Taps on textbox, the default keyboard comes up. Now, keyboard is on display mode and i clicked on button which navigates me to another screen. After navigation it is giving me half the screen size to be in black and that is actually keyboard. So can anyone tell me how to hide the keyboard first and then navigate to another screen?
Is it possible to assign override OnBackKeyPress method to the button control? If not, what is the other way to get out of this problem?
All you have to do is changing the focus from textbox to page. Just add this code to button's tap event:
this.Focus();

Using Popup control in Window 8

Is there any property of pop up , wherein we can dim the window app.
As in metro app there is no Child Window control available , so using
popup in place of it but the problem in popup is when it is open the
user can still interact with other control on window app.
So is there an workaround to make the window app dim when pop is open.
I'm not sure to understand what your trying to do. You can put a Border as first child of the popup which exposes the Background property. So if you specify a not null Background (Transparent for instance) the popup will catch every interactions.
It sounds like you want the MessageDialog class. The popup is meant to be non-modal, letting the user close it by just clicking away from it. The MessageDialog is a regular modal popup that does not let the user interact with the rest of the app when it is displayed.
If you really insist on using the popup control, here is a simple workaround:
Make the popup use all the screen (using a grid or border), then set that background to Black with opacity 0.1 (or any other color you see fit, this is to give a "dim" effect), then inside this popup, place another container with the size and margins that you want to act as your "real" popup.
Because the popup takes the whole screen it will prevent the user from clicking anywhere in the screen.

CF - Button when pressed receives a focus (bold border)

As the question is asked ... how can i prevent that from happening?
I have ZOOM IN and ZOOM OUT button that receive focus after pressed.
The button in CF does not have focus property so im guessing im required to do another painful workaround...
Any ideas?
This is the way the system draws the buttons when clicked. If you don't want this you'll have to redraw the button (and it various states) yourself

clicking title bar fires onBlur in Opera

I am closing a popup window at 'onBlur' defined for 'BODY' of an ASP webpage, so when a user clicks outside the popup the popup closes. I want the popup to be moveable around the screen and it works for all browsers but Opera.
In Opera the 'onBlur' event is fired when clicking the titlebar of the popup - this seems weird for me, as the titlebar is a part of the popup window, right?
What can I do about it?
Perhaps close the popup from the parent window's onfocus instead?
I can confirm the problem based on this test:
javascript:void(window.open('data:text/html,window.onblur=window.close', '', 'width=100,height=100'));
Perhaps you could report a bug on https://bugs.opera.com/wizard/ ?