Inno
Inno

Reputation: 2557

Application disappears in the background

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

Answers (1)

Jack
Jack

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

Related Questions