我有一个 C# 表单应用程序,因为我有一个菜单,其中一项是 help
。它有一个子项关于
。正如您在许多应用程序中看到的那样,当您单击帮助时,会打开一个单独的对话框来显示信息。
我想要这样的东西。
最佳答案
看起来您搜索的时间并不长,这里只需使用预定义模板添加一个:
您可能会发现此链接很有用:
引自那里:
- Create a new windows form application
- In the "Solution explorer" ,left part of the screen , right click on the name of your windows application.
- Choose Add-->New item
- From the " Add new item window" choose "AboutBox" , name it "AboutBox1" , click on Add button. Now you have in your applicatoin two forms, "Form1" -- created by default by your project type and "AboutBox1" .
- Right click on the "Form1" and choose "Design View".
- Double click on the design sourface of form1.
After that you will see this code:
private void Form1_Load(object sender, EventArgs e) { }
Add this code to your application, to look like this:
private void Form1_Load(object sender, EventArgs e) { AboutBox1 a = new AboutBox1(); a.Show(); }
Run the application.
关于c# - 在 C# 窗体应用程序中创建关于对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19675910/