关闭MDI窗口中的表单 [英] Close form which is in MDI window

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

问题描述

你好朋友.

我正在VB.net上工作

我有主要的MDI表格.我想关闭在按下ESC键时在MDI窗口中打开的表单.



问候
Imrankhan

Hi friend.

I am working on VB.net

I have main MDI form. I want to close form which is opened in MDI window on keypress of ESC key.



Regard
Imrankhan

推荐答案

以适当的形式处理KeyUp事件,然后在处理程序中查找e.KeyCode中的转义键的键代码.
Handle the KeyUp event in the appropriate form, and in the handler, look for the key code for the escape key in e.KeyCode.


另一个选项
有一个具有代码Me.Close的关闭按钮,并将窗体的CancelButton属性设置为关闭按钮.
Another option
Have a close button with has the code Me.Close and Set the CancelButton property of the form to the close button.


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

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