Reputation: 2557
in my application there is a print form. When you click the print button, the windows print dialog appears, showing the printed page. When it's finished the print form is closed (this is still ok) but my application is set to the background on the z-order (this is not ok) and another application window is set to the foreground.
I could help myself by calling WinAPI-SetForegroundWindow() from my application, but it flickers and I don't think that this is a clean approach.
A clean approach would be that my application doesn't get set to the background.
Any suggestions?
Upvotes: 0
Views: 170
Reputation: 292
try to call .ShowDialog with your form as the first parameter. that should bring your form into the front after the dialog is closed.
Upvotes: 1