About 2,660,000 results
Open links in new tab
  1. Display error dialog (MessageBox) with Only "Close" or "Cancel" buttons?

    Jan 28, 2012 · So, how can I display a simple error dialog with a single Close/Cancel button? Is this possible with the standard MessageBox class or must I resort to custom dialog (or library) …

  2. Force to close MessageBox programmatically - Stack Overflow

    Get rid of the message boxes from interupting the workflow. This is probably the best solution as from the sound of it closing a message box programatically will cause workflow to …

  3. How to show a custom error or warning message box in .NET …

    How can I show message boxes with a "Ding!" sound and a red 'close' button in it? This is what I'm talking about: I'm trying to create some custom errors and warnings, but this: …

  4. C# Message Box - C# Corner

    MessageBox class has an overloaded static Show method that displays a message box with a message and action buttons. The action buttons can be OK and Cancel, Yes and No etc. Here …

  5. How to Enable close button of message box window in C# - C

    I want to enable close button of message box window .I am trying this code but close button is not enable. if ( MessageBox .Show( "Do you want to close this window?" , "Confirmation" , …

  6. Handling Close Button Click Event in C# - Web Dev Tutor

    Jul 23, 2024 · If you are developing a Windows Forms application in C#, you can easily handle the close button click event by attaching an event handler to the FormClosing event. This …

  7. c# - Close form button event - Stack Overflow

    Jul 23, 2013 · Apply the below code where you want to make the code to exit the application. System.Windows.Forms.Application.Exit()

  8. MessageBox.Show Method in C# - C# Corner

    For example, if you want to ask a user to close a form on a Yes button click of a message box, you can do something like this. Form1.cs code. result = MessageBox.Show("Welcome to C# …

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

    Feb 26, 2025 · In this article, we will explore various methods to create popup messages in C#, complete with code examples and explanations to help you implement them seamlessly in …

  10. C# have form close when enter pressed - Microsoft Q&A

    Jun 21, 2023 · Try to select the form (click the caption), go to Properties, and specify the Done button in “Accept Button” field. Also add the Click event for the Done button, which will execute …

Refresh