Artikel ini akan menjelaskan bagaimana menampilkan informasi komputer, dan proses program yang sedang berjalan atau aplikasi pada mesin. Hal ini juga mendeteksi jika mesin terhubung ke jaringan atau tidak. Anda bisa lihat juga penggunaan saat ini dari memori fisik komputer, memori virtual, sistem operasi yang digunakan, platform sistem operasi, Versi, Memantau Heigh dan monitor Lebar.
Setelah menyelesaikan aplikasi ini, sepertinya seperti yang ditunjukkan di bawah ini:
Untuk mulai membangun program ini, buka visual basic di komputer anda dan membuat proyek baru. Kemudian tambahkan datagridview, groupbox sebuah, sebuah progressbar, dua belas label dan sebelas textbox dan timer. Kemudian menyesuaikan dan mengatur semua kontrol yang sama dengan susunan yang terlihat di atas dan mengubah nama semua label yang sama seperti yang ditunjukkan dalam desain akhir.
Kemudian klik ganda Timer1, dan tambahkan kode berikut:
Code :
1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
2. 'this three lines of code is responsible for providing data about memory
3. Dim availphyMem As Integer = My.Computer.Info.AvailablePhysicalMemory / 1000000
4. Dim totlPhyMem As Integer = My.Computer.Info.TotalPhysicalMemory / 1000000
5. Dim totVirtMem As Integer = My.Computer.Info.TotalVirtualMemory / 1000000
6. 'this line is for the name of computer
7. Dim compname As String = My.Computer.Name
8. 'current username used on the machine
9. Dim compuser As String = SystemInformation.UserName
10. 'display the Operating installedon this machine
11. Dim OS As String = My.Computer.Info.OSFullName
12. 'show the platform of the operating installed
13. Dim OSplatform As String = My.Computer.Info.OSPlatform
14. 'it display the Operating system version
15. Dim osversion As String = My.Computer.Info.OSVersion
16. 'display the height and width of the machine
17. Dim HeighMon As Integer = SystemInformation.PrimaryMonitorSize.Height
18. Dim WidthMon As Integer = SystemInformation.PrimaryMonitorSize.Width
19.
20. 'it loops trough all the processes happening running in this machine
21. For Each p As Process In Process.GetProcesses
22. 'it display to the datagridview provided
23. DT.Rows.Add(p.ProcessName.ToString)
24. Next
25. 'it check if the machine is connectd to the network or not
26. If My.Computer.Network.IsAvailable Then
27. txtnetavailable.Text = "Connected"
28. Else
29. txtnetavailable.Text = "Not Connected"
30.
31. End If
32. 'it get and set the maximum value of progressbar
33. ProgressBar1.Maximum = availphyMem
34. ProgressBar1.Value = availphyMem
35. 'this is the formula to get the percentage
36. percent = (ProgressBar1.Value / totlPhyMem) * 100
37. 'it display the percentage in the label
38. lblpercent.Text = percent & "%"
39.
40. 'it assign and display all the data from the variable above
41. 'and display the corresponding value into the textboxes provided
42. txtcompname.Text = compname
43. txtusername.Text = compuser
44. txtos.Text = OS
45. txtosplatform.Text = OSplatform
46. txtosversion.Text = osversion
47. txtavailmem.Text = availphyMem & " MB"
48. txtphymem.Text = totlPhyMem & " MB"
49. txtvirmem.Text = totVirtMem & " MB"
50. ProgressBar1.Maximum = totlPhyMem
51. txtheigh.Text = HeighMon
52. txtwidth.Text = WidthMon
53.
54. End Sub
Setelah Itu Klik Dua Kali Form Mainnya
Code :
1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
2. 'it starts the timer
3. Timer1.Start()
4. 'create new column named "List of processes"
5. DT.Columns.Add("List of Processes")
6. 'set the datasource of the datagridview to DT
7. DataGridView1.DataSource = DT
8.
9. End Sub
10.
11.</vbent>
12.
13.And below Public class, add the following code:
14.<vbnet>
15.'declaration of variable
16. Dim processName As String
17. 'declaration of DT variable as Datatable
18. Dim DT As New DataTable
19. Dim percent As Integer
jika terdapat kesalahan, silahkan komentar
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :