如何在事件中添加用户定义参数 [英] how to add user define parameter in event

查看:63
本文介绍了如何在事件中添加用户定义参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,





任何人都告诉我如何在像这样的事件中添加用户定义参数

原创活动::: private void buttonprocess_Click(object sender,EventArgs e)



我想改变

private void buttonprocess_Click(object sender,EventArgs e,DataGridViewEventArgs e)



怎么可能?







谢谢

解决方案

这个链接可以帮到你。



如何为a创建活动用户控制 [ ^ ]



问候

Skhan


如果你想在系统定义用户控件上公开自定义事件,你需要继承它/>


现在用你想要的签名创建一个代表



http://msdn.microsoft.com/en-IN/library/ms173176.aspx [ ^ ]



组播:< a href =http://msdn.microsoft.com/en-us/library/ms173175.aspx> http://msdn.microsoft.com/en-us/library/ms173175.aspx [< a href =http://msdn.microsoft.com/en-us/library/ms173175.aspxtarget =_ blanktitle =New Window> ^ ]



如何创建活动



http://msdn.microsoft.com/en-us/library/8627sbea(v = vs.71).aspx [ ^ ]



现在通过按钮点击


这有助于创建活动。

[ 添加活动的简单代码片段 [ ^ ] ^]

Hello All,


Any one tell me how to we add a user define parameter in an event like this
original event :::private void buttonprocess_Click(object sender, EventArgs e)

and i want to change
private void buttonprocess_Click(object sender, EventArgs e,DataGridViewEventArgs e)

how is it possible?



Thanks

解决方案

This link may help you.

How to Create an Event for a User Control[^]

Regards
Skhan


If you want to expose customize event on system define user control you need to inherit it.

Now create a delegate with your desire signature

http://msdn.microsoft.com/en-IN/library/ms173176.aspx[^]

Multicast : http://msdn.microsoft.com/en-us/library/ms173175.aspx[^]

How to create an event

http://msdn.microsoft.com/en-us/library/8627sbea(v=vs.71).aspx[^]

Now call your event from the button click


This is helpful to create a event.
[A Simple Code Snippet to Add an Event[^]^]


这篇关于如何在事件中添加用户定义参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆