打开另一个表单并关闭自己 [英] Open Another form and close itself

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

问题描述

我进行了网络搜索,发现有人正在寻找我正在寻找的东西:


有2种形式... named => formA和formB

,每个人都有自己的名为=>的按钮btnA和btnB


应用程序以formA开头

你能告诉我代码......当我点击formA中的btnA时,它将

关闭formA并打开formB ...


然后当我从formB单击btnB时,它将关闭formB并打开form


我该怎么做?我不希望他们的可见设置为.false

我希望他们真的关闭并且不使用我的计算机上的资源..怎么样?

感谢您的帮助.... <

http:/ /www.experts-exchange.com/Prog..._21185658.html

I did a web search and found someone is looking for what I''m looking for:

There are 2 forms...named => formA and formB
and each of them have their own button named => btnA and btnB

The application starts with formA

can you show me the code that... when I click on btnA in formA, It will
CLOSE formA and open formB...

Then when I click btnB from formB, it will close formB and open back formA

How can I do this? I dun want their visible set to .false
I want them really close and use no resources from my computer.. How?
Thanks for your help....

http://www.experts-exchange.com/Prog..._21185658.html

推荐答案

最好的方法是:

http://msdn.microsoft.com/library/de...adingToNET.asp

the best way is this :

http://msdn.microsoft.com/library/de...adingToNET.asp


谢谢,但我在那篇文章中找不到解决方案。

它是关于froms之间的沟通,我不知道如何通过另一种形式关闭表格。 (或显示新表格,然后关闭旧表格)


" ucasesoftware" < UC *********** @ hotmail.fr>在消息中写道

news:11 ********************** @ f14g2000cwb.googlegr oups.com ...
Thanks, But I couldn''t find a solution in that article.
it is about communication between froms, I don''t know how to
close a form through another form. (or show a new form, then close old form)

"ucasesoftware" <uc***********@hotmail.fr> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
最好的方法是:

http://msdn.microsoft.com/library/de...adingToNET.asp



如果formb在forma中被实例化,那么你不能在没有

销毁formb的情况下关闭。


你能做的就是使用表单a和b中的按钮中的代码返回

a对话框结果到调用代码,这样我们就可以在子开始中有一个循环

这是一个可选的启动点并使用从返回值到

决定接下来要采取的操作。


-

最好的问候


无与伦比的Mr Newbie o?o

" Sabre" <马刀[.AT。] oxin.ir>在消息中写道

新闻:OT ************** @ tk2msftngp13.phx.gbl ...
If formb is instantiated within forma, then you cannot close forma without
destroying formb.

What you can do is to use the code in the button in forms a and b to return
a dialog result to the calling code so we could have a loop in the sub Start
which is an optional startup point and use the return value from the from to
decide what action to take next.

--
Best Regards

The Inimitable Mr Newbie o?o
"Saber" <saber[.AT.]oxin.ir> wrote in message
news:OT**************@tk2msftngp13.phx.gbl...
我做了网络搜索并且发现有人正在寻找我正在寻找的东西:

有2种形式... named => formA和formB
并且每个人都有自己的名为=>的按钮。 btnA和btnB

应用程序从formA开始

你能告诉我代码......当我点击formA中的btnA时,它会关闭formA然后当我从formB点击btnB时,它将关闭formB并打开表格A

我该怎么办呢?我不希望他们的可见设置为.false
我希望他们非常接近并且不使用我的计算机上的资源..怎么样?
感谢您的帮助....

< a rel =nofollowhref =http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21185658.html\"target =_ blank> http://www.experts-exchange.com /Prog..._21185658.html
I did a web search and found someone is looking for what I''m looking for:

There are 2 forms...named => formA and formB
and each of them have their own button named => btnA and btnB

The application starts with formA

can you show me the code that... when I click on btnA in formA, It will
CLOSE formA and open formB...

Then when I click btnB from formB, it will close formB and open back formA

How can I do this? I dun want their visible set to .false
I want them really close and use no resources from my computer.. How?
Thanks for your help....

http://www.experts-exchange.com/Prog..._21185658.html



这篇关于打开另一个表单并关闭自己的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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