In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about the skills of making VB.NET dialog boxes. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
This article will use the VB.NET dialog box to dynamically display your program version information, then you may want to use the System.Reflection class to get these dynamic information, but in fact to achieve this function you do not need to edit complex code. A code example is included in program A.
Program A:
The following is a code snippet:
Private Sub DynamicAboutBox () Dim strAbout As String Dim exeApp As System.Reflection.Assembly exeApp = System.Reflection.Assembly.GetExecutingAssembly () Dim exeName As System.Reflection.AssemblyName exeName = exeApp.GetName () strAbout = "Application:" & exeName.Name & vbCrLf strAboutstrAbout = strAbout & "Version:" & exeName.Version.ToString () & vbCrLf strAboutstrAbout = strAbout & "CodeBase:" & exeName.CodeBase & vbCrLf strAboutstrAbout = strAbout & "Company:" & System.Windows.Forms.Application.CompanyName & vbCrLf strAboutstrAbout = strAbout & "Product:" & System.Windows.Forms.Application.ProductName & vbCrLf MessageBox.Show (strAbout) End Sub
The running result of this VB.NET code example for the dialog box is similar to figure 1.
In this example of VB.NET about the dialog, I get the necessary application information by using the System.Reflection class. At the same time, I also use the class System.Windows.Forms.Application to get additional information directly.
Here I define a string variable strAbout to store the application information that will be displayed. At the same time, I also define two other variables: exeApp as the variable of System.Reflection.Assembly and exeName as the variable of System.Reflection.AssemblyName.
The variable exeApp is the name used to get the collection. Then, I combine information such as exeName variables (name, version, code language), ProductName (product name), and (CompanyName) company name, where ProductName (product name) and (CompanyName) company name are obtained using the properties of the System.Windows.Forms.Application class.
Thank you for reading! This is the end of this article on "what are the skills for making VB.NET dialogs?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.