关于c#:如何创建小帮助-关于按钮以显示应用程序版本 | 珊瑚贝

How to create small help – about button in order to show the application version


我有 Winform 应用程序,我想添加带有 about 选项的小帮助按钮以显示我的应用程序版本号(我正在使用 Application.ProductVersion),我该怎么做?


首先,要激活帮助按钮,请转到您的表单属性。
将 MaximizeBox 和 MinimizeBox 设置为 false 并将 HelpButton 设置为 true。
这将显示帮助按钮。
然后转到表单的事件并双击 HelpButtonClicked。
在此函数中,您可以放置??用于显示版本号的任何代码。

我还建议您使用:
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()

  • 如果我想要最小化我的应用程序的选项?
  • 如果您希望能够最小化应用程序,您需要自己添加按钮。关于此还有另一个堆栈溢出线程:stackoverflow.com/questions/11140090/
  • system.reflection 行只为您提供应用程序版本。


我想你正在寻找
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version


来源:https://www.codenong.com/12730068/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_9964.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?