Bila Anda ingin mendapatkan informasi tentang Processor, berikut contoh Project untuk memperlihatkannya :
Buat Project baru dengan 1 Form
Tambahkan Kontrol ke Form1 :
7 Label (Label1 s/d Label7)
Tulis kode ini di event Form1_Load :
Dim o As Object
For Each o In GetObject("winmgmts:").InstancesOf("Win32_Processor")
Label1.Text = "NamaProcessor = " & Trim(o.Name)
Label2.Text = "ClockSpeed = " & o.MaxClockSpeed & " Mhz"
Label3.Text = "ID = " & o.ProcessorID
Label4.Text = "Versi = " & o.Version
Label5.Text = "Deskripsi = " & o.Description
Label6.Text = "Pabrik = " & o.Manufacturer
Next
Label7.Text = "Jumlah core = " & Environment.ProcessorCount
Jalankan Project, lalu coba lihat hasilnya di masing-masing Label.

Tidak ada komentar