如何在Windows中将一个窗体重定向到另一个窗体 [英] How to Redirect one Form to another Form in Windows

查看:92
本文介绍了如何在Windows中将一个窗体重定向到另一个窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在网页上很容易使用linkBut​​ton / PostbackURL / Responce.Redirect



但我没有人打开另一个Windows窗体。



请提示。

解决方案

hi,



创建该表单的对象,objname.show()或objname.ShowDialog()将重定向到另一个表单...





或者



frmTest2 ObjViewer = new frmTest2();

this.Hide();

ObjViewer.ShowDialog ();

1。 从一种表单重定向到另一种表单 [ ^ ]。br />

Quote:

关闭当前表单 - this.Close(),

创建对象另一种形式并调用formObject.Show()方法。



2. 从一个窗口窗体重定向到另一个窗口窗体 [ ^ ]。

Quote:

 HomeForm objHomeForm =  new  HomeForm(); 
objHomeForm.Show();


In web it is easy to use linkButton/PostbackURL/Responce.Redirect

But I do not got any one to open another Windows Form.

Please hints.

解决方案

hi,

Create an object of that form and objname.show() or objname.ShowDialog() will redirect to another form...


OR

frmTest2 ObjViewer = new frmTest2();
this.Hide();
ObjViewer.ShowDialog();


1. Redirect from one form to another form[^].

Quote:

Close the current form - this.Close(),
Create object for another form and call formObject.Show() method.


2. Redirect from one window forms to another window form[^].

Quote:

HomeForm objHomeForm = new HomeForm();
objHomeForm.Show();


这篇关于如何在Windows中将一个窗体重定向到另一个窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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