About 5,440 results
Open links in new tab
  1. .net - How do I create a MessageBox in C#? - Stack Overflow

    It is a static function on the MessageBox class, the simple way to do this is using MessageBox.Show("my message"); in the System.Windows.Forms class. You can find more on the msdn page for this here . Among other things you can control the message box text, title, default button, and icons.

  2. MessageBox Class (System.Windows.Forms) | Microsoft Learn

    Displays a message window, also known as a dialog box, which presents a message to the user. It is a modal window, blocking other actions in the application until the user closes it. A MessageBox can contain text, buttons, and symbols that inform and instruct the user.

  3. C# Message Box

    C# MessageBox in Windows Forms displays a message with the given text and action buttons. You can also use MessageBox control to add additional options such as a caption, an icon, or help buttons. In this article, you'll learn how to display and use a …

  4. 5 Examples to Create C# Messagebox [OK, Yes/No etc.]

    Oct 9, 2018 · How to Create Message Box in C#? A message box or dialog box is used to interact with the users of your application. The purpose of using a message box may include notifying about a particular action e.g. success message after entering a record. Similarly, an error message if an operation is unsuccessful.

  5. C# MessageBox Example: A Beginner's Guide - Web Dev Tutor

    Jul 23, 2024 · MessageBox is a popular feature in C# that allows developers to display messages and interact with users through dialog boxes. In this guide, we will explore how to utilize MessageBox effectively in your C# applications with practical examples.

  6. How to Popup A Message in C# - Delft Stack

    Feb 26, 2025 · The most straightforward way to display a popup message in C# is by using the MessageBox.Show method. This method allows you to create a message box with a title, a message, and various buttons for user interaction.

  7. C#.WinForms - MessageBox.Show Examples - Dot Net Perls

    Dec 27, 2021 · MessageBox. In C# programs based on Windows Forms, MessageBox is a dialog. Dialog boxes interrupt users—they force users to respond before further action is taken.

  8. C# Message Box | Gyata - Learn about AI, Education & Technology

    Dec 8, 2023 · In C#, the MessageBox class in the System.Windows.Forms namespace is used to display a modal message box. First things first, to use MessageBox in C#, you need to include the System.Windows.Forms namespace in your code. The following code snippet shows how to create a basic message box. MessageBox.Show("This is a basic message box!");

  9. c# - How do I create a message box with "Yes", "No" choices and …

    Mar 1, 2017 · Use: MessageBoxResult m = MessageBox.Show("The file will be saved here.", "File Save", MessageBoxButton.OKCancel); if(m == m.Yes) { // Do something } else if (m == m.No) { // Do something else } MessageBoxResult is used on Windows Phone instead of DialogResult...

  10. How to Create Message Box in C# - Web Dev Tutor

    Jul 22, 2024 · Message boxes are a common way to display important information, warnings, errors, or notifications to users in a C# application. In this tutorial, we will explore how to create message boxes using C#. In C#, the MessageBox class from the System.Windows.Forms namespace is used to show message boxes.

Refresh