Reputation: 16368
I have a Winforms application with a form that shows a dialog:
using (MyForm form = new MyForm)) {
form.ShowDialog(this);
}
The dialog being shown has the following properties:
StartPosition = CenterParent
ControlBox = True
MaximizeBox = True
MinimizeBox = True
FormBorderStyle = Sizable
Normally, the form displays modally on top of the calling form. However, when running in Windows 10 in Tablet Mode (like on a Surface Pro 3 with the keyboard removed), the form shows behind the calling form and there's no way to get to it because everything is full screen.
Is there any setting I can change to prevent this behavior (other than telling the user to not use Tablet Mode)?
Upvotes: 3
Views: 1801
Reputation: 51
In case someone else stumbles upon this question looking for a solution to that same problem in WPF:
Specifying ShowInTaskbar="False" on dialogs worked for me.
Upvotes: 3
Reputation: 16368
Well, this is dumb. I took a look at another form being shown as a dialog that actually works. The difference:
MaximizeBox = False
Once you remove the ability to maximize the form, it shows as you would expect. The funny thing is it was never necessary to be able to maximize the form; it just got left with the default value.
Upvotes: 0