Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomePortalHighScoresClient DownloadSearchLatest imagesRegisterLog 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.
Similar topics

 

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

Go down 
2 posters
AuthorMessage
ISkillahI
Respected Member
Respected Member
ISkillahI


Posts : 209
Join date : 2010-09-02

How to make a program that shows you HardWare Information in VB 08. Empty
PostSubject: How to make a program that shows you HardWare Information in VB 08.   How to make a program that shows you HardWare Information in VB 08. EmptyFri 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 :
How to make a program that shows you HardWare Information in VB 08. Hardwareinformation

Download :
http://www.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
Zumori
Respected Member
Respected Member
Zumori


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

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

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


Posts : 209
Join date : 2010-09-02

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

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

Nah Sly
Back to top Go down
Sponsored content





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

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
-
» Can you Make a Sig for me Plawks?
» teach me how to make sigs!
» Staff Information

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