c# - 在 C# 窗体应用程序中创建关于对话框

标签 c# forms

我有一个 C# 表单应用程序,因为我有一个菜单,其中一项是 help。它有一个子项关于。正如您在许多应用程序中看到的那样,当您单击帮助时,会打开一个单独的对话框来显示信息。

我想要这样的东西。

最佳答案

看起来您搜索的时间并不长,这里只需使用预定义模板添加一个:

Add item window

您可能会发现此链接很有用:

social.msdn.microsoft.com

引自那里:

  1. Create a new windows form application
  2. In the "Solution explorer" ,left part of the screen , right click on the name of your windows application.
  3. Choose Add-->New item
  4. 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" .
  5. Right click on the "Form1" and choose "Design View".
  6. Double click on the design sourface of form1.
  7. After that you will see this code:

    private void Form1_Load(object sender, EventArgs e)
    {
    
    }
    
  8. Add this code to your application, to look like this:

    private void Form1_Load(object sender, EventArgs e)
    {
        AboutBox1 a = new AboutBox1();
        a.Show();
    }
    
  9. Run the application.

关于c# - 在 C# 窗体应用程序中创建关于对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19675910/

相关文章:

C# - 如何在使用 Tectia 将文件从 Windows 传输到 Unix 时删除 ctrl M 字符?

jquery - 使用表单值通过 jquery 更改 CSS

html - 如何仅输出带值的下拉菜单(并给它们命名)- Contact Form 7

javascript - 将 2 个表单输入加在一起

javascript - 使用 php 提交表单

php - 将文本字段中的新行保存到 mysql 字段

c# - 使用 NUnit 进行测试时应该如何处理数据文件?

c# - 从具体化 'System.Int32' 类型到 'System.String' 类型的指定转换无效

c# - ViewModel 中未调用方法 - MVVMCross

c# - 使用 WinSCP 禁止在 SFTP 或 SCP 中使用主机 key