The dialog box is a graphical control element in the form of a small window that communicates information to the user and prompts them for a response.
There are two types of dialog boxes:
- These dialog boxes block the interaction with the software that initiated the dialog.
- These are used when the user input is required before going ahead with the processing.
- These do not block the interaction with software that initiated the dialog.
- These are used when the requested information is not essential to continue, and so the window can be left open while work continues elsewhere.
These dialog boxes interrupt our flow while working and the following steps can be followed to close them.
Method 1: Using controls on the dialog box
Usually the dialog box contains information for the user to read and few options according to the information.
- Via GUI:
You can choose one of the options or directly click on the “X” symbol on the top-right corner of the dialog box.
- Via Keys:
If you are used to command-line and are not comfortable with using a mouse, you can press “Esc” key to cancel the dialog box. If you prefer to select the options given, use the “tab/arrow” key(s) to navigate between the options and press enter when the chosen option is highlighted.
Note: The user input would directly close the dialog box.
Method 2: To handle struck dialog boxes
Sometimes the dialog box gets struck and we will not be able to go ahead. In such cases, save the current work and close the entire application to start again.
- Using the task bar:
Right-click the icon referring to the dialog box from the Windows taskbar and click “Close”.
- Using the Task Manager:
Open the Task Manager using the search bar(“ctrl + alt + del”), right-click on the application that you want to close and click on “End task”.
Method 3: Closing the entire program and any other programs that are open
Either restart the system or shut down and start again.
- ES6 | Dialog Boxes
- JQueryUI | dialog
- How to disable a button in jQuery dialog from a function ?
- Python - Tkinter Choose color Dialog
- How to use Mat-Dialog in Angular ?
- Bootstrap | Close Icon for dismissing content with Examples
- How to avoid dropdown menu to close menu items on clicking inside ?
- How to automatically close all collapsible elements inside of the accordion when closing the accordion?
- How to open or close react-bootstrap modal pro-grammatically?
- How to close sidebar by default using Bootstrap ?
- Difference Between DOS and Windows
- How to set PHP development environment in windows ?
- How to Create a WiFi Hotspot in Windows 8 using Command-prompt?
- How to install Sublime Text 3 in Windows?
- How to disable Windows Startup services?
- How to update Sound Drivers in Windows PC?
- How to Create a Desktop Shortcut in Windows?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.