مرسی خیلی خوب بود

به این کد یه نگاه بنداز ببین اطلاعاتی که میده چه طوره . سخت افزاریه ؟ یا نه با تغییر ویندوز عوض میشه ؟
میشه ازشون برای ساخت سریال استفاده کرد به طوری که با عوض کردن ویندوز سریال تغییر نکنه ؟
کد:
'Return a hardware identifier
    Private Overloads Shared Function identifier(ByVal wmiClass As String, ByVal wmiProperty As String, ByVal wmiMustBeTrue As String) As String
        Dim result As String = ""
        Dim mc As New System.Management.ManagementClass(wmiClass)
        Dim moc As System.Management.ManagementObjectCollection = mc.GetInstances()
        Dim mo As System.Management.ManagementObject
        For Each mo In moc
            If mo(wmiMustBeTrue).ToString() = "True" Then
                'Only get the first one
                If result = "" Then
                    Try
                        result = mo(wmiProperty).ToString()
                        Exit For
                    Catch
                    End Try
                End If
            End If
        Next mo
        Return result
    End Function 'identifier
    'Return a hardware identifier
    Private Overloads Shared Function identifier(ByVal wmiClass As String, ByVal wmiProperty As String) As String
        Dim result As String = ""
        Dim mc As New System.Management.ManagementClass(wmiClass)
        Dim moc As System.Management.ManagementObjectCollection = mc.GetInstances()
        Dim mo As System.Management.ManagementObject
        For Each mo In moc
            'Only get the first one
            If result = "" Then
                Try
                    result = mo(wmiProperty).ToString()
                    Exit For
                Catch
                End Try
            End If
        Next mo
        Return result
    End Function 'identifier
    Private Shared Function cpuId() As String
        'Uses first CPU identifier available in order of preference
        'Don't get all identifiers, as very time consuming
        Dim retVal As String = identifier("Win32_Processor", "UniqueId")
        If retVal = "" Then 'If no UniqueID, use ProcessorID
            retVal = identifier("Win32_Processor", "ProcessorId")
            If retVal = "" Then 'If no ProcessorId, use Name
                retVal = identifier("Win32_Processor", "Name")
                If retVal = "" Then 'If no Name, use Manufacturer
                    retVal = identifier("Win32_Processor", "Manufacturer")
                End If
                'Add clock speed for extra security
                retVal += identifier("Win32_Processor", "MaxClockSpeed")
            End If
        End If
        Return retVal
    End Function 'cpuId
    
    'BIOS Identifier
    Private Shared Function biosId() As String
        Return identifier("Win32_BIOS", "Manufacturer") + identifier("Win32_BIOS", "SMBIOSBIOSVersion") + identifier("Win32_BIOS", "IdentificationCode") + identifier("Win32_BIOS", "SerialNumber") + identifier("Win32_BIOS", "ReleaseDate") + identifier("Win32_BIOS", "Version")
    End Function 'biosId
'Main physical hard drive ID
    Private Shared Function diskId() As String
        Return identifier("Win32_DiskDrive", "Model") + identifier("Win32_DiskDrive", "Manufacturer") + identifier("Win32_DiskDrive", "Signature") + identifier("Win32_DiskDrive", "TotalHeads")
    End Function 'diskId
    
    'Motherboard ID
    Private Shared Function baseId() As String
        Return identifier("Win32_BaseBoard", "Model") + identifier("Win32_BaseBoard", "Manufacturer") + identifier("Win32_BaseBoard", "Name") + identifier("Win32_BaseBoard", "SerialNumber")
    End Function 'baseId
    
    'Primary video controller ID
    Private Shared Function videoId() As String
        Return identifier("Win32_VideoController", "DriverVersion") + identifier("Win32_VideoController", "Name")
    End Function 'videoId
    
    'First enabled network card ID
    Private Shared Function macId() As String
        Return identifier("Win32_NetworkAdapterConfiguration", "MACAddress", "IPEnabled")
    End Function 'macId
فقط توی رفرنس اینم لود کن :

System.Management

یه سوال دیگه هم داشتم که گفتم الکی یه پست بخاطرش درست نکنم :
من میخواستم یه کاری کنم که فرم برنامه یه قسمتی از دسکتاپ بشه .
مثلا اگه روش کلیک راست شد انگار روی دسکتاپ کلیک راست کردیم . و فوکوس نگیره فرم و همیشه روی دسکتاپ باشه .
خلاصه می خوام جزیی از دسکتاپ بشه