-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsole_test.cs
36 lines (33 loc) · 1000 Bytes
/
console_test.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Windows.Forms;
namespace MyApplication
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// Display a pop-up with three buttons
DialogResult result = MessageBox.Show("Please press one of the following buttons:",
"Popup with Buttons",
MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question);
// Handle the button presses
if (result == DialogResult.Yes)
{
MessageBox.Show("You pressed button A1");
}
else if (result == DialogResult.No)
{
MessageBox.Show("You pressed button A2");
}
else if (result == DialogResult.Cancel)
{
MessageBox.Show("You pressed button A3");
}
}
}
}