表格关闭问题.. [英] form close problem..

查看:75
本文介绍了表格关闭问题..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我创建了7个表单.

问题是...我想关闭单击菜单时打开的表单.

hi all,

i have create 7 forms.

problem is ... i want to close form which is open when i click on menu.

推荐答案

好吧,如果我理解正确的话,这可能对您有所帮助.

关闭特定表格
Well if I understand correctly this may help you.

To close a specific form
Private Sub ExitToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ExitToolStripMenuItem.Click
    Me.Close()
End Sub



关闭所有表格并退出应用程序调用



To close all forms and exit application call

Application.Exit()


从您的主要表单开始.

注意:从您的主窗体调用Me.Close()通常会关闭所有窗体,包括自身和关闭应用程序.如果这不是您要执行的操作,则需要在主表单上调用Me.Hide().

这有帮助吗?


From your main form.

Note: Calling Me.Close() from your main form will usually close all forms including itself and shutdown app as well. If this is not what you want to do you will need to call Me.Hide() on your main form instead.

Does this help?


这篇关于表格关闭问题..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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