如何添加表格 [英] how to add about form

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

问题描述

请告诉我单击按钮时如何显示关于"对话框.

Please tell me how I can show an About dialog when I click a button.

推荐答案

选择添加新项"(右键单击您的项目,然后选择添加> Windows窗体.从已安装的模板中选择关于Box (将其从AboutBox1.cs重命名为AboutBox.cs).单击添加. />
要打开它,请在 Help>下添加一个菜单项到您的主窗体中.关于.双击菜单以创建事件处理程序,然后在该事件处理程序中输入以下代码:
Select Add New Item (right click on your project and select Add > Windows Form. Choose About Box from the installed templates (rename it from AboutBox1.cs to AboutBox.cs). Click Add.

To open it, add a menu item to your main form under Help > About. Double click the menu to create an event handler, and in that event handler enter the following code:
using (AboutBox dlg = new AboutBox())
{
  dlg.ShowDialog(this);
}

可以,您现在有了一个About框-并且它也会自动清除.

There you go, you''ve now got an About box - and it cleans up after itself as well.


单击.aspx页中的按钮,您将会自动转移到onclick上.您可以将对话框的表示形式更改为.visible ="true"或其他内容.
Click the button in the .aspx page and you will be automatically transferred to the onclick even''t. You can change your dialog presentation to .visible=''true'' or something.


尝试在面板控件中写入大约"所需的数据"
" 面板控件是控件的集合
如果您希望可以放入其中
默认设置为面板控件"visible = false"

当您单击关于"按钮时
在按钮事件中编写代码
panel1.visible = true
try write data ''about'' u require in panel control
panel control is a collection of controls
if u want u can place in it
set by default ''visible=false'' for panel control

when u click on about button
in button event write the code
panel1.visible=true


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

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