Membuat aplikasi pengambil informasi spec PC








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 Microsoft.Win32;

namespace informasi
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
        }

        private void breged_Click(object sender, EventArgs e)
        {
            RegistryKey buka = Registry.LocalMachine;

            RegistryKey namaOS = buka.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion");
            RegistryKey procesor = buka.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
            RegistryKey motherborad = buka.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\Bios");
            RegistryKey arsitektur = buka.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");

            Ios.Text = Convert.ToString(namaOS.GetValue("ProductName"));
            Iprocessor.Text = Convert.ToString(procesor.GetValue("ProcessorNameString"));
            Iarsitektur.Text = Convert.ToString(arsitektur.GetValue("Identifier"));
            Imotherboard.Text = Convert.ToString(motherborad.GetValue("BaseBoardManufacturer"));


        }      
      
      
    }
}

Komentar

Postingan populer dari blog ini

Tentang Microsoft Visual Basic