如何将一个表单的事件鼠标单击到另一个表单 [英] how to get event mouse click of one form into another

查看:118
本文介绍了如何将一个表单的事件鼠标单击到另一个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表单,通过调用mouse_click事件,我捕获鼠标点击并存储在'mpoint'变量中。现在我有第二个表单,所以我的问题是我如何调用第一个表单的mouse_click事件以便我可以使用第二种形式的'mpoint'值

I have a form ,by invoking mouse_click event,i captured mouse clicked point and stored in 'mpoint' variable.now i have a second form,so my question is how i invoke mouse_click event of first form so that i can use 'mpoint' value in second form

推荐答案

你需要做的确切取决于两种形式之间的关系。如果表单创建了另一个的实例,则将其命名为Parent,将新表单称为Child。现在因为父母知道孩子(它必须要创建实例),但孩子不需要知道父母,你想要做什么取决于你的两个表格之间的关系。



见这里:

在两种表格之间传递信息,第1部分:父母对儿童 [ ^ ]

在两种形式之间传递信息,第2部分:儿童到父母 [ ^ ]

陈德良在两种形式之间推断信息,第3部分:儿童与儿童 [ ^ ]
Exactly what you need to do depends on the "relationship" between the two forms. If a form creates an instance of the other, call it the "Parent" and new form it's "Child". Now because the parent knows about the child (it has to in order to create the instance), but the child needn't know about the parent, exactly what you want to do depends on teh relationship between your two forms.

See here:
Transferring information between two forms, Part 1: Parent to Child[^]
Transferring information between two forms, Part 2: Child to Parent[^]
Transferring information between two forms, Part 3: Child to Child[^]


这篇关于如何将一个表单的事件鼠标单击到另一个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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