HOW TO FIND DIFFERENT SYSTEM PARAMETERS
In VB .NET, you can find the current directory (the one that your application's running in, for example) with this code:(System.Environment.CurrentDirectory)
The System.Environment object allows you to find out many other aspects of the environment
====================================================================================
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.Show(Environment.CurrentDirectory)
MessageBox.Show(Environment.CommandLine) 'running program
MessageBox.Show(Environment.MachineName)
MessageBox.Show(Environment.OSVersion.ToString)
MessageBox.Show(Environment.SystemDirectory)
MessageBox.Show(Environment.UserDomainName)
MessageBox.Show(Environment.UserName)
MessageBox.Show(Environment.Version.ToString)
End Sub
====================================================================================
No comments:
Post a Comment