Im not gonna write something long.
This simple C# program just gets the infomation of the computer.
Its simple and easy to understand it only involves strings and bools.
Its my first C# program that i made my self that means i haven't look at any tuts and i haven't stealed any codes from other sources
Pic of the program:
Spoiler (Click to View)
This simple C# program just gets the infomation of the computer.
Its simple and easy to understand it only involves strings and bools.
Its my first C# program that i made my self that means i haven't look at any tuts and i haven't stealed any codes from other sources
Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Principal;
using System.Net;
using System.Management;
namespace Computer_Info
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
label2.Text = "";
label4.Text = "";
label6.Text = "";
label8.Text = "On/Off";
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
string computername;
computername = WindowsIdentity.GetCurrent().Name.ToString();
label2.Text = computername;
string user;
user = Dns.GetHostName();
label4.Text = user;
string os;
os = System.Environment.OSVersion.ToString();
label6.Text = os;
bool capslock;
capslock = Console.CapsLock;
if (capslock == true)
{
label8.Text = "On";
}
else
{
label8.Text = "Off";
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}Pic of the program:
Spoiler (Click to View)


