已有56人关注
C#的窗体应用
发表在C#图书答疑 2012-12-13
是否精华
版块置顶:
编程环境:Microsoft Visual Studio 2010
程序清单
//****程序清单start
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 串口1
{
    public partial class Form1 : Form
    {
        //string data;
        public Form1()
        {
            InitializeComponent();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = "aaaaaaaaaa";
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox2.Text = "bbbbbbbbbb";
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            textBox2.Text = "cccccccccc";
        }

    }
}

//****程序清单end
其中的“button2_Click”得不到执行。不知何故,请指教。
分享到:
精彩评论 1
小科_mrkj
学分:43 LV2
2012-12-15
沙发
读者朋友:
    您好,在窗体上拖放一个Button控件,然后在属性窗口中切换到事件,找到Click事件,跟你的button2_Click关联在一起。
首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照