如何为添加到表单中的控件编码事件 [英] How to coding Event for control that it is added into form

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

问题描述

我有1种形式的小型应用程序,在我的表单中我通过代码(controls.add)添加了listbox()name:List1.我编写了事件

I have small application with 1 form, in my form I added listbox()name:List1 by code(controls.add).I wrote event

Private Sub List1_DblClick()
    mbDblClick = True
 End Sub



用户双击列表框时处理事件.
但是为什么它不运行?
用户双击ListBox(List1)
时如何处理事件
你能帮我吗?
谢谢.



to handle event when user double click on Listbox.
But why doesn''t it run?
How to I can handle event when user double click on ListBox(List1)

Can you help me?
Thanks.

推荐答案

哦,天哪,您真的在使用VB6吗?创建列表框时,请确保使用 withevents 关键字:
Oh god, are you really using VB6? Make sure to use the withevents keyword when creating your listbox: example.


这篇关于如何为添加到表单中的控件编码事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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