使用Windows表单 [英] Working with windows forms

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

问题描述

您好朋友,C#的新手,正在尝试开发Windows应用程序.我的问题是我使用按钮和链接浏览了不同的表单,但是当我使用按钮/标签单击事件调用表单并尝试关闭包含用于调用其他表单的代码的整个表单时,整个应用程序关闭.

有时,我想调用另一个表单并保持先前​​的表单打开但在后台禁用,当我关闭当前表单时,我希望先前的表单再次变为活动状态,但是我没有找到解决方案.

拜托,任何人都可以帮助我
在此先感谢
Martin Katumba

Hi friend, am new to C# and trying to develop a windows application. my problem is that i have used buttons and links to navigate through different forms, but when i call up a form with a button/label click event and try to close the current form that houses the code calling up the other form, the entire application closes.

At times a i want to call up another form and keep the previous form open but disabled in the background, when i close the current form, i want the previous to become active again, but i have failed to figure out the solution.

Please, anyone help me
Thanks in advance
Martin Katumba

推荐答案

katumbamartin写道:
katumbamartin wrote:

但是当我用一个按钮/标签单击事件,然后尝试关闭包含调用另一个表单的代码的当前表单,整个应用程序将关闭.

but when i call up a form with a button/label click event and try to close the current form that houses the code calling up the other form, the entire application closes.



为此,您需要更改应用程序的性质.现在,您的主要形式是负责运行您的整个应用程序.



In order to do this, you need to change the nature of your app. Right now, your main form is what is responsible for running your entire application.

katumbamartin写道:
katumbamartin wrote:

C#的新成员



我建议您开始练习学习如何使用Google,并购买一些书籍.我在google上找到了此信息:

http://social.msdn.microsoft.com/论坛/en-US/Vsexpressvcs/thread/aabaad37-b0c2-4ba7-9dd8-3260a102321d [



I would suggest you start to practice learning how to use google, and also buy some books. I found this info with google:

http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/aabaad37-b0c2-4ba7-9dd8-3260a102321d[^]

katumbamartin写道:
katumbamartin wrote:

有时,当我关闭当前表单时,我想调用另一个表单并保持先前​​的表单打开但在后台禁用,我希望以前的版本再次生效,但是我无法找出解决方案.

At times a i want to call up another form and keep the previous form open but disabled in the background, when i close the current form, i want the previous to become active again, but i have failed to figure out the solution.



如果使用ShowDialog显示它,则会发生这种情况.

再次,购买一些书籍以学习这些基础知识,并学会在网络上搜索信息.



If you show it with ShowDialog, this will happen.

Again, buy some books to learn these sort of basics, and learn to search the web for info also.


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

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