خرید بک لینک

gameover.blog.ir


این پروژه(در ویژوال استادیو 2012 ساختیم)

http://s9.picofile.com/file/8316791092/test.rar.html


نویسنده:بیسواد


وقتی روی 1 2 بزنید ، 1 1 باتن 1 اجرا میشه.اینم کد کامل:


using System;


using System.Collections.Generic;


using System.ComponentModel;


using System.Data;


using System.Drawing;


using System.Linq;


using System.Text;


using System.Threading.Tasks;


using System.Windows.Forms;




namespace test


{


public partial class Form1 : Form


{


public Form1()


{


InitializeComponent();


}




private void button1_Click(object sender, EventArgs e)


{


MessageBox.Show(button1.Name);




}




private void button2_Click(object sender, EventArgs e)


{


button1_Click(button1, e);


}


}


}


نکته:

در قسمت button1_Click(button1, e); می تونید به جای e و button1 مقدار null بدید و اونطرف دیگه sender دریافت نمیشه و اسم دکمه و این چیزا قابل دریافت نیست و فقط می تونید توی کلیک باتن 1 مثلا یک پیام رو با MessageBox نمایش بدید.

برچسب: نویسنده: ایلیا حیدری تاريخ: سه شنبه 26 دی 1396 ساعت: 4:07

صفحه بندی