当鼠标移过子窗体时,如何使子窗体成为主动控件? [英] How do I make the subform the active control when the mouse moves over it?

查看:82
本文介绍了当鼠标移过子窗体时,如何使子窗体成为主动控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含子表单的表单。目前,为了使用鼠标滚轮滚动subfomr,我必须单击子窗体中的某个位置。我希望能够在鼠标移过它时选择它,这样我就不必点击了。我查看了子表单事件,但列出的只有两个是On_Enter和On_Exit。我尝试将子窗体的事件视为一个窗体而不是子窗体,唯一有意义的是On_Mouse_Move。唯一的问题是我不知道如何检查鼠标是否在子表格或常规表格上移动。


这可能吗?

I''ve got a form that has a subform on it. Currently, in order to scroll in the subfomr with the mouse wheel, I have to click somewhere in the subform. I would like to be able to be able to have it be selected when the mouse moves over it so that I don''t have to click. I''ve looked at the subform events, but the only two listed are On_Enter and On_Exit. I tried looking at the events of the subform as a form and not as a subform and the only one that makes sense is On_Mouse_Move. The only problem is that I don''t know how to check if the mouse is moving over the subform or the regular form.

Is this possible?

推荐答案

在SubForm的Detail部分中尝试MouseMove()事件。
Try the MouseMove() Event in the Detail Section of the SubForm.


好的,我把以下内容放在MouseMove()事件中,就像你说的那样。
Okay, I put the following in the MouseMove() event like you said.
展开 | 选择 | Wrap | 行号


我觉得你的解释让Seth很困惑。你可以发布代码(包括所有相关的行,比如程序包装​​器等)。
I find your explanation very confusing Seth. Can you post the code (including all relevant lines, such as the procedure wrappers, etc).


这篇关于当鼠标移过子窗体时,如何使子窗体成为主动控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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