Bringing winform window to front

1

There are some parts of my application that need the user's feedback, such as asking about whether to update, or the system activation screen, but sometimes these screens, or messagebox, are left unselected, and are behind the window chain. I need to know how to leave a screen or messagebox on all the screens of the program, and maybe if possible, all windows, waiting for the user's response, so he has to respond instead of continuing to use the system or another program.     

asked by anonymous 19.05.2016 / 14:52

3 answers

3

MessageBox :

By default the MessageBox will always appear in front of all other windows.

Forms :

You can show the forms with ShowDialog() , this will preclude the user from interacting with other forms of the same application until the current form is closed.

The method BringToFront() can be used to place a form ahead of the others in the application.

The method Activate() does basically the same thing as BringToFront , with the additional focus on form.

As for putting the form in front of any windows operating system, I think there is nothing native, anyway, I'll look for more on this.

Just a tip: Users generally do not like this type of behavior (pop-ups jumping in front of any window).

    
19.05.2016 / 15:12
0

To leave your application ahead of all others in the terminal, or the form in front of everything, put this.TopMost = true , this way you will always leave this application ahead of ALL . Ai to work with forms use the methods already indicated: ShowDialog , BringToFront or Activate .

    
19.05.2016 / 22:27
-1

For this you have to use the form you want above as form.ShowDialog()

    
19.05.2016 / 14:55