How to prevent popup get focus when popup show - windows-8

If set popup's IsLightDismissEnabled = true ,when popup show ,popup will get focus , other control will lost focus.
My question :How can I keep the focus;when the popup show ?

That's counter-intuitive, in my opinion. IsLightDismissEnabled effectively means "show this popup, but once it loses focus hide it". If you aren't giving your popup focus, or setting focus to another control programmatically, it will either show until you carry on interacting with your form, or not show at all (not sure which, I haven't checked it)

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?

Can we keep the Form scrollbar but prevent the form from auto-scrolling to the focused control?

I want to prevent my form from automatically scrolling when a control at the bottom is focused but still keep the scrollbars if they ever appear.
Since some users have a slightly lower screen's resolution than the form, the scrollbars do sometimes appear. This created a problem with some DataGridView. Since the AutoScroll option is enabled, when clicking the DataGridView, it does a multiselect since we click and it moves.
When I disable the AutoScroll property, the scrollbars go away. Therefore, the user can't see everything.
Is there a way to disable the AutoScroll, but still keep the scrollbar?
If I understand your situation correctly, you basically want the user to have the ability to scroll the form manually but prevent the form from scrolling automatically to the control that gets focused.
Put this code in your form:
Protected Overrides Function ScrollToControl(activeControl As Control) As Point
'Return MyBase.ScrollToControl(activeControl) ' <-- Keep this line commented.
End Function
Result:

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.

Show Alert using tooltip in vb.net

I have a small application in which I need to show alerts if a particular condition is met. I have an mdi form and several child forms. Now the best way to show an alert is to show a tooltip on the right side corner of my mdi form. Though this works, but the problem is I want user to close the tooltip once he has read.
Now the tooltip that vb.net provide does not support click events. If I give a long time duration the tooltip would be open all the time and if I give a short duration then it will close quickly.
What can I do ?
Help will be appreciated.
Thanks,
GR
You might consider a statusbar at the bottom of the window instead of a tooltip (like at the bottom of Word). You can intercept clicks on those, split the bar into several sections as necessary, etc.
Alternately, I'd probably code up a little pop up form with no border, min/max.close buttons etc, like a toast message, and show it as necessary, Stick an RTF control on it and you're "tooltips" can be very richly formatted, add a timer and the window can disappear after a short timeout, or intecept the click and close it manually.

the parent dialog can move

I want prevent the parent dialog, not move.
when dialog process data (17s) i can move the parent dialog to anywhere.
You can remove the title bar of the window by removing the title text and setting the ControlBox, MaxmimizeBox and MinimizeBox properties to false.
I would however think twice before doing this; there are very few things that annoy me as much as a user, as windows that position themselves topmost at the center of the screen, with no option to move them away to keep on working on something else.