1个最后一个问题出纸箱 [英] 1 last problem exit box

查看:85
本文介绍了1个最后一个问题出纸箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VB 2010 Express.我创建了2个表格.我用me.hide和form2.show和
的每个表单都有一个按钮 me.hide和form1.show代码及其正常工作.但是,如果我单击第二个表单中的退出框,它就会消失并且第一个表单是隐藏的,我该怎么做才能避免这种情况?

I am using VB 2010 express. I have created 2 forms. I got a button to each form with me.hide and form2.show and
me.hide and form1.show code and its working fine.But if i click the exit box in the second form , it dissapears and the first form is hidden what do i have to do to avoid that ?

推荐答案

Public Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

    Form1.Show()

End Sub


有很多事件关闭表单时触发.您可以使用它.
事件之一是 FormClosing .关闭form2时,使form1可见.
意味着当您使用crossbutton [X]关闭表单时,将加载form1.
There are number of events fired when form get''s closed. you can use that.
one of the event is FormClosing. make a form1 visible when you close form2.
Means when you close your form with crossbutton[X] then form1 will load.


这篇关于1个最后一个问题出纸箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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