如何在vb.net中显示表格 [英] how to show the form in vb.net

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

问题描述

在我想要的vb.net表单中,当我单击按钮时,另一个将被打开,该表单的窗口状态是正常的.我给编码

In my vb.net form i want to when i click the button the another will be opened, that form''s window state is normal. I give the coding

Form2.show()


但是显示了form2,它将不会显示在form1的前面.它显示在form1的后面,所以我给


But the form2 is displayed it will not be displayed in front of the form1. it displays in back of the form1 so i give

Form2.show
form2.bringtofront


但是,如何操作却不起作用,请任何机构帮忙


But it is not working how to do it please any body help

推荐答案

要先打开所需的表单.转到项目菜单,然后选择Windows应用程序1属性(或应用程序的名称),将有带有下拉列表的启动表单选项.在那儿,选择您必须运行的表单,例如:form2

我认为这可以解决您的问题.
To open the expected form first.Go to project menu and then select windows application 1 properties (or the name of the application) there will be startup form option with dropdown list. In that, select what form you have to run eg:form2

I think this solves your problem.


您应该在Show()方法显示想要成为TopMost的窗口之后,尝试将TopMost属性设置为true.
Form.TopMost属性 [
you should try to set true of TopMost property after the window desired to be TopMost is displayed by Show() method.
Form.TopMost Property [^] which is used to Gets or sets a value indicating whether the form should be displayed as a topmost form.


您可以尝试使用此表单.

You may try this one.

Form2 objForm = new Form2();
objForm.Activate();
objForm.Visible = true;



这是C#形式.您可以使用代码转换器查看结果...



This is in C# form. You may use code converter to see the result...


这篇关于如何在vb.net中显示表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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