HomePortalHighScoresClient DownloadSearchMemberlistUsergroupsRegisterLog in
Welcome to RoyalScape's Community!
Please vote at royalvote.tk to bring in more players!
You can download the client by clicking the "Download" tab in the navigation bar.
RoyalScape is owned by Kevin, so all donations should be given to him.

Share | 
 

 How to make a program that shows you HardWare Information in VB 08.

Go down 
AuthorMessage
ISkillahI
Respected Member
Respected Member
avatar

Posts : 207
Join date : 2010-09-02

PostSubject: How to make a program that shows you HardWare Information in VB 08.   Fri Sep 10, 2010 12:47 pm

I started coding in visual baisc like 1 year now.
So this is not for beginners.




HardWare Information!

Image :


Download :
mediafire.com ?ekj6qyd6v6gk5kc

VirusTotal :
http://www.virustotal.com/file-scan/report.html?id=69efe721400ce648590efe8b4cfa14eba86ad39fd64a722c9eed9d485f8b9899-1284140365

If Someone want the code :

Form1 :
Code:
Imports System.Management
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Dim searcher As New ManagementObjectSearcher( _
                      "root\CIMV2", _
                      "SELECT * FROM Win32_BIOS")
            Dim dt As DataTable = globals.getStructure
            For Each queryObj As ManagementObject In searcher.Get()
                If queryObj("BIOSVersion") Is Nothing Then
                    globals.addRow(dt, "BIOSVersion", queryObj("BIOSVersion"))
                Else
                    Dim arrBIOSVersion As String()
                    arrBIOSVersion = queryObj("BIOSVersion")
                    For Each arrValue As String In arrBIOSVersion
                        globals.addRow(dt, "BIOSVersion", arrValue)
                    Next
                End If
                globals.addRow(dt, "CurrentLanguage", queryObj("CurrentLanguage"))
                globals.addRow(dt, "Description", queryObj("Description"))
                globals.addRow(dt, "Manufacturer", queryObj("Manufacturer"))
                globals.addRow(dt, "PrimaryBIOS", queryObj("PrimaryBIOS"))
                globals.addRow(dt, "ReleaseDate", queryObj("ReleaseDate"))
            Next
            Me.DataGridView1.DataSource = dt

        Catch err As ManagementException
            MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
        End Try
        Try
            Dim searcher As New ManagementObjectSearcher( _
            "root\CIMV2", _
            "SELECT * FROM Win32_Bus")
            Dim dt As DataTable = globals.getBusStructure
            For Each queryObj As ManagementObject In searcher.Get()
                globals.addBus(dt, Convert.ToString(queryObj("BusType")), queryObj("DeviceID"), queryObj("PNPDeviceID"), queryObj("SystemName"))
            Next
            Me.DataGridView2.DataSource = dt
        Catch err As ManagementException
            MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
        End Try
        Try
            Dim searcher As New ManagementObjectSearcher( _
                  "root\CIMV2", _
                  "SELECT * FROM Win32_MotherboardDevice")

            Dim dt As DataTable = globals.getMotherBoardDevice
            For Each queryObj As ManagementObject In searcher.Get()
                globals.addMotherBoardDevice(dt, queryObj("DeviceID"), queryObj("PrimaryBusType"), queryObj("SecondaryBusType"))
            Next
            Me.DataGridView3.DataSource = dt
        Catch err As ManagementException
            MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
        End Try
        Try
            Dim searcher As New ManagementObjectSearcher( _
                  "root\CIMV2", _
                  "SELECT * FROM Win32_MemoryDevice")

            Dim dt As DataTable = globals.getMemoryDeviceStructure
            For Each queryObj As ManagementObject In searcher.Get()
                globals.addMemoryDevice(dt, queryObj("DeviceID"), Convert.ToString(queryObj("EndingAddress")), Convert.ToString(queryObj("StartingAddress")), queryObj("SystemName"))
            Next
            Me.DataGridView4.DataSource = dt
        Catch err As ManagementException
            MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
        End Try
        Try
            Dim searcher As New ManagementObjectSearcher( _
                  "root\CIMV2", _
                  "SELECT * FROM Win32_SoundDevice")

            Dim dt As DataTable = globals.getSoundDeviceStructure
            For Each queryObj As ManagementObject In searcher.Get()
                globals.addSoundDevice(dt, queryObj("Manufacturer"), queryObj("Name"), queryObj("PNPDeviceID"), queryObj("ProductName"))
            Next
            Me.DataGridView5.DataSource = dt
        Catch err As ManagementException
            MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
        End Try
        Label1.Text = "*** BIOS INFORMATION ***" + vbNewLine + vbNewLine + _
        "Application Name : " + Application.ProductName + vbNewLine + vbNewLine + _
        "Application Version : " + Application.ProductVersion + vbNewLine + _
        vbNewLine + "Author Name : DogEatsCat" + vbNewLine + vbNewLine + _
        "Todays Date : " + Date.Today.ToString
    End Sub
End Class

Globals :

Code:
Module globals
    Public Function getSoundDeviceStructure() As DataTable
        Dim dt As New DataTable
        dt.Columns.Add(New DataColumn("Manufacturer"))
        dt.Columns.Add(New DataColumn("Name"))
        dt.Columns.Add(New DataColumn("PNPDeviceID"))
        dt.Columns.Add(New DataColumn("ProductName"))
        Return dt
    End Function
    Public Sub addSoundDevice(ByRef dt As DataTable, ByVal Manufacturer As String, ByVal Name As String, ByVal PNPDeviceID As String, ByVal ProductName As String)
        Dim dr As DataRow
        dr = dt.NewRow
        dr("Manufacturer") = Manufacturer
        dr("Name") = Name
        dr("PNPDeviceID") = PNPDeviceID
        dr("ProductName") = ProductName
        dt.Rows.Add(dr)
    End Sub
    Public Function getMemoryDeviceStructure() As DataTable
        Dim dt As New DataTable
        dt.Columns.Add(New DataColumn("DeviceID"))
        dt.Columns.Add(New DataColumn("EndingAddress"))
        dt.Columns.Add(New DataColumn("StartingAddress"))
        dt.Columns.Add(New DataColumn("SystemName"))
        Return dt
    End Function
    Public Sub addMemoryDevice(ByRef dt As DataTable, ByVal DeviceID As String, ByVal EndingAddress As String, ByVal StartingAddress As String, ByVal SystemName As String)
        Dim dr As DataRow
        dr = dt.NewRow
        dr("DeviceID") = DeviceID
        dr("EndingAddress") = EndingAddress
        dr("StartingAddress") = StartingAddress
        dr("SystemName") = SystemName
        dt.Rows.Add(dr)
    End Sub
    Public Function getMotherBoardDevice() As DataTable
        Dim dt As New DataTable
        dt.Columns.Add(New DataColumn("DeviceID"))
        dt.Columns.Add(New DataColumn("PrimaryBusType"))
        dt.Columns.Add(New DataColumn("SecondaryBusType"))
        Return dt
    End Function
    Public Sub addMotherBoardDevice(ByRef dt As DataTable, ByVal DeviceID As String, ByVal PrimaryBusType As String, ByVal SecondaryBusType As String)
        Dim dr As DataRow
        dr = dt.NewRow
        dr("DeviceID") = DeviceID
        dr("PrimaryBusType") = PrimaryBusType
        dr("SecondaryBusType") = SecondaryBusType
        dt.Rows.Add(dr)
    End Sub
    Public Function getBusStructure() As DataTable
        Dim dt As New DataTable
        dt.Columns.Add(New DataColumn("BusType"))
        dt.Columns.Add(New DataColumn("DeviceID"))
        dt.Columns.Add(New DataColumn("PNPDeviceID"))
        dt.Columns.Add(New DataColumn("SystemName"))
        Return dt
    End Function
    Public Sub addBus(ByRef dt As DataTable, ByVal BusType As String, ByVal DeviceID As String, ByVal PNPDeviceID As String, ByVal SystemName As String)
        Dim dr As DataRow
        dr = dt.NewRow
        dr("BusType") = BusType
        dr("DeviceID") = DeviceID
        dr("PNPDeviceID") = PNPDeviceID
        dr("SystemName") = SystemName
        dt.Rows.Add(dr)
    End Sub
    Public Sub addRow(ByRef dt As DataTable, ByVal p As String, ByVal v As String)
        Dim dr As DataRow
        dr = dt.NewRow
        dr("Property") = p
        dr("Value") = v
        dt.Rows.Add(dr)
    End Sub
    Public Function getStructure() As DataTable
        Dim dt As New DataTable
        dt.Columns.Add(New DataColumn("Property"))
        dt.Columns.Add(New DataColumn("Value"))
        Return dt
    End Function
End Module




Credits : ME =D


Last edited by ISkillerI on Fri Sep 10, 2010 3:07 pm; edited 4 times in total
Back to top Go down
View user profile
Zumori
Respected Member
Respected Member
avatar

Posts : 188
Join date : 2010-08-13
Age : 22

PostSubject: Re: How to make a program that shows you HardWare Information in VB 08.   Fri Sep 10, 2010 2:12 pm

Or you could just go into BIOS itself......
Back to top Go down
View user profile
ISkillahI
Respected Member
Respected Member
avatar

Posts : 207
Join date : 2010-09-02

PostSubject: Re: How to make a program that shows you HardWare Information in VB 08.   Fri Sep 10, 2010 2:59 pm

Zumori wrote:
Or you could just go into BIOS itself......

Nah Sly
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: How to make a program that shows you HardWare Information in VB 08.   

Back to top Go down
 
How to make a program that shows you HardWare Information in VB 08.
Back to top 
Page 1 of 1
 Similar topics
-
» How do you make a mmv ?
» Jester java chess program
» What graphic program do you use? - BGF Graphics Design Club
» Houdini Chess Program Crushed!! - Using The A.R.B Chess System
» Make money with Swagbucks and Bing and others?

Permissions in this forum:You cannot reply to topics in this forum
 :: Community :: General Discussion-
Jump to: