A common example of this is when a program asks the user if they accept terms and conditions.

The user can either confirm the dialog, or exit.

you could then display the new window to the user.

Hands typing on laptop

AWinforms input dialog boxis another example of a dialog box it’s possible for you to create.

The confirmation dialog will show when the user triggers an event in the program.

Record their response and display it back onto the screen using the “responseLabel” label.

Winforms new button on canvas

Inside the function, generate the content for the Confirmation dialog window itself.

How to trigger the Confirmation Dialog

trigger the Windows Forms tool using the run button.

bring up the confirmation dialog and tap on one of the buttons.

New button properties window

To create a confirmation dialog, create a function that will display it when an event occurs.

When creating the confirmation dialog, create a new window and add a message to display to the user.

Add buttons onto the confirmation dialog for the user to punch, and return the result.

New label on Winforms canvas

Explore how to add different themes to your program.

New label properties window

Runtime play button at the top of Visual Studio

Terms and conditions button on the app at runtime

Confirmation dialog showing at runtime

Confirmation dialog response showing in main window