c#在另一个项目vb.net中创建并引发事件和句柄 [英] c# create and raise event and handle in another project vb.net

查看:77
本文介绍了c#在另一个项目vb.net中创建并引发事件和句柄的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用此项目进行动态处理在我的vb.net应用程序中引用了控件的处理。我面临的问题是布线控制说按钮到类动态移动和重新调整相同的块按钮moused双击事件



这里我找到了一个选项从该参考项目中引发双击事件



所以c#项目可能会在另一个vb.net项目中为控制abd句柄引发mouseoubleclick事件

解决方案

是的......但这通常不是一个好主意。问题是DoubleClick是一个标准事件,你不应该以编程方式提出,因为它是一个物理鼠标事件,应该由用户发起。

你可以这样做: 处理双击WinForms中的TabPage选项卡 [ ^ ]向您展示如何(使用反射来访问OnDoubleClick方法)。



只是非常非常确定你需要这样做! / BLOCKQUOTE>

i have been working with This Project for dynamic handling of controls the mentioned project is referenced in my vb.net application. The problem here i am facing is wiring control say button to class for dynamically moving and re-sizing of same blocks the mousedoubleclick event of button

Here i found one option either raise double click event from that reference project

so is it possible for c# project to raise mouseoubleclick event for control abd handle the same in another vb.net project

解决方案

Yes...but it's not generally a good idea. The problem is that DoubleClick is a "standard event" which you shouldn't be raising programmatically, as it's a "physical mouse" event and should be initiated by the user.
You can do it though: Processing Double Click on a TabPage Tab in WinForms[^] shows you how (using reflection to access the OnDoubleClick method).

Just be very, very sure that you need to do this!


这篇关于c#在另一个项目vb.net中创建并引发事件和句柄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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