VB3与VB6形式事件触发问题 [英] VB3 vs VB6 Form Event Triggering problem

查看:143
本文介绍了VB3与VB6形式事件触发问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我注意到Form Unload& amp;在VB3和VB6上工作时QueryUnload事件。下面是场景。


示例:我有一个ParentForm,它是一个MDIChild和一个DialogForm(vbModal),用于填充某些字段的输入。请注意DialogForm 不是MDIChild


在VB3.0中


加载ParentForm并单击添加按钮。它将为用户的输入加载/显示DialogForm。


用户点击DialogForm上的取消按钮。它会卸载。请注意,此处没有Form_Unload事件。


用户单击ParentForm上的关闭按钮,首先触发ParentForm的Form_Unload事件,并触发DialogForm的Form_QueryUnload事件。


然而在VB6.0中它的不同如下所示


VB6.0


加载ParentForm并点击添加按钮。它将为用户的输入加载/显示DialogForm。


用户点击DialogForm上的取消按钮。它将消失但是Form_QueryUnload事件被触发。


ParentForm的Form_Unload事件根本不会触发。


请告诉我是否有任何事件问题在这里?我甚至提到了VB3.0和VB6.0的帮助文件,但两者都提到了相同的语句,没有区别。


请让我知道如何实现类似于VB3.0的事件流程在VB6.0


问候,


 

解决方案

Raagzy,这是VB7到VB10的论坛(.NET版本)


对于VB6的帮助,请看这个主题:


http://social.msdn.microsoft.com/论坛/ EN-US / vblanguage /线程/ aa350a38-3bb9-4919-9cc1-afaf7fed52f5


Hi All,

I have noticed a strange problem in the Form Unload & QueryUnload events while working on VB3 and VB6. Below is the scenario.

Example: I have a ParentForm which is a MDIChild and a DialogForm (vbModal) used to populate some fields for inputs. Please note DialogForm is not a MDIChild

In VB3.0

ParentForm is loaded and on click of a Add Button. It will load / show the DialogForm for inputs from the user.

User clicks a Cancel Button on DialogForm. It will unload. Note there is not Form_Unload event here.

User clicks a Close Button on ParentForm, the ParentForm's Form_Unload event is fired first, and the DialogForm's Form_QueryUnload event is fired.

However in VB6.0 its different as below

VB6.0

ParentForm is loaded and on click of a Add Button. It will load / show the DialogForm for inputs from the user.

User clicks a Cancel Button on DialogForm. It will disappear but the Form_QueryUnload event is triggered.

The ParentForm's Form_Unload event will not trigger at all.

Please let me know whether there is any problem here? I even referred to VB3.0 and VB6.0 help files but both mention the same statements with no differences.

Please let me know how i can achieve the event flow similar to VB3.0 in VB6.0

Regards,

 

解决方案

Raagzy, This is a forum for VB7 through VB10 (.NET versions)

For VB6 help, please see this thread:

http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/aa350a38-3bb9-4919-9cc1-afaf7fed52f5


这篇关于VB3与VB6形式事件触发问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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