myoungbl

Me.BringToFront()

Me.TopMost = True

Neither of these do what I need to do.

I have written a printer monitor that forces a user to enter authentication before printing is allowed.

It works just fine except for a small detail, that I've had trouble with before. I am unable to get the authentication form to appear on top of all forms (not just the cuurent app). This is an absolute must.

I've looked and search, and the closest I've come is a suggestion that somehow I access the notify Windows to put my app on top of all others, and short of resorting to an API call, I can't find a way to do this within .NET.

Can anyone help me

Thanks.

Marshall




Re: Windows Forms General How to get my app on top of all others.

BinaryCoder

BringToFront only affects the Z-order within your app, so it probably will not be useful. Did you try the Form.Activate method





Re: Windows Forms General How to get my app on top of all others.

myoungbl

Not until you suggested it. That, and then setting the topmost property to true, did precisely what I needed. I've used the Activated event before, but I had never noticed there was an Activate method.

Thank you.

Marshall






Re: Windows Forms General How to get my app on top of all others.

myoungbl

Am I wasting my time with the topmost property here I am wondering if this property affects the apps windows relationship to all windows on the desktop, or to just those in the current app

Thanks.






Re: Windows Forms General How to get my app on top of all others.

sirjis

TopMost windows appear in front of all windows, even those from other programs (unless those other windows are also TopMost).