Nice first program :D! You should add a project file.
And maybe if you add the VB.net version, you'll get more comments :
VB.net :
EDIT : 1000th post.
And maybe if you add the VB.net version, you'll get more comments :
VB.net :
Code
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports System.Security.Principal
Imports System.Net
Imports System.Management
Namespace Computer_Info
Public Partial Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
Private Sub button2_Click(sender As Object, e As EventArgs)
label2.Text = ""
label4.Text = ""
label6.Text = ""
label8.Text = "On/Off"
End Sub
Private Sub button1_Click(sender As Object, e As EventArgs)
Dim computername As String
computername = WindowsIdentity.GetCurrent().Name.ToString()
label2.Text = computername
Dim user As String
user = Dns.GetHostName()
label4.Text = user
Dim os As String
os = System.Environment.OSVersion.ToString()
label6.Text = os
Dim capslock As Boolean
capslock = Console.CapsLock
If capslock = True Then
label8.Text = "On"
Else
label8.Text = "Off"
End If
End Sub
End Class
End NamespaceEDIT : 1000th post.
