This single line of VB.NET code below will put the name of the current Windows user into the currentUserName variable:
The following VB.NET will make use of the SystemInformation class in order to obtain the battery charge status in percentages and the current power source: AC power / battery charging or battery power / battery not charging.
To get the current screen resolution in VB.NET you can use the Bounds.Height and Bounds.Width properties as such:
The following piece of code uses the My.Computer.Network.IsAvailable property to determine whether or not the computer is connected to a network. This network could be the Internet or a local network; for as long as the computer is connected to one such network, the response retrieved will be positive.
Opening an URL in the default browser using VB.NET could not be any simpler. All you need to do is to invoke the Process.Start() method and pass the URL of the page that you wish to open:
Using RegEx this VB.NET code validates an email address. It’s checking for a string separated by the at (@) character, and again separated by a dot.
This few lines of code are retrieving the list of files that are copied to the clipboard, if any.
This Visual Basic .NET code will detect if multiple instances of the current application are running by retrieving the number of running processes with the same name.
Replace only the last occurrence of a string within a larger string, using a VB.NET code snippet.