首页 > Windows开发 > 详细

【C#】MessageBox啥的

时间:2020-10-17 22:38:21      阅读:50      评论:0      收藏:0      [点我收藏+]

 1 using System;
 2 using System.Collections.Generic;
 3 using System.ComponentModel;
 4 using System.Data;
 5 using System.Drawing;
 6 using System.Linq;
 7 using System.Text;
 8 using System.Threading.Tasks;
 9 using System.Windows.Forms;
10 
11 namespace test1
12 {
13     public partial class Form1 : Form
14     {
15         public Form1()
16         {
17             InitializeComponent();
18         }
19 
20         private void Form1_Load(object sender, EventArgs e)
21         {
22 
23         }
24 
25         private void btn_Click(object sender, EventArgs e)
26         {
27             //如果点击取消
28             if (MessageBox.Show(txt.Text, "嘿嘿", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
29             {
30                 MessageBox.Show("");
31             }
32             else MessageBox.Show("哦呼");
33         }
34         //数输入数据的长度
35         private void txt_TextChanged(object sender, EventArgs e)
36         {
37             lab2.Text = txt.Text.Count().ToString();
38         }
39     }
40 }

 

【C#】MessageBox啥的

原文:https://www.cnblogs.com/OnlyACry/p/13832378.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!