如何在vb.net 10中将事件一个项目提升到另一个项目 [英] how to raise event one project to another in vb.net 10

查看:62
本文介绍了如何在vb.net 10中将事件一个项目提升到另一个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将一个项目提升到另一个vb.net项目



如何用参数提高该事件





任何人都可以告诉我

i want to raise one project to another vb.net project

how to raise that event with parameter


can anyone expain and tell me

推荐答案

你所要做的就是在DLL类中创建一个事件,提高它。如果基于表单的项目正在处理事件,则将调用处理程序,并将引发事件的类实例作为 sender 参数和任何EventArgs传递为 e 参数。您可以提供从EventArgs派生的类来传递,该类可以包含您需要的任何数据,或者通过 sender 从DLL类实例访问它。



这里有一个创建活动的指南:一步一步:VB.NET中的事件处理 [ ^ ]
All you have to do is create an event in the DLL Class, and raise it. If your Form based project is handling the event, the handler will be called, and passed the class instance that raised the event as the sender parameter and any EventArgs as the e parameter. You can provide a class derived from EventArgs to pass through which can contain any data you need to, or access it from the DLL class instance via the sender.

There is a guide to creating events here: Step by Step: Event handling in VB.NET[^]


这篇关于如何在vb.net 10中将事件一个项目提升到另一个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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