Read CPU information

xiaoxiao2021-03-06  17

'Reference Microsoft WMI scripting 1.1 library' built a text on the form, named Text1, and 'Text1.Multiline = TRUE

Private Sub GetProcessorID () Dim a As SWbemServices Dim b As SWbemObjectSet Dim c As SWbemObject Dim d As SWbemPropertySet Dim e As SWbemProperty Set a = GetObject ( "winmgmts:") Set b = a.InstancesOf ( "Win32_Processor") For Each c In B with c if.properties_.count> 0 THEN SET D = .properties_ for Each E IN D Text1 = TEXT1 & E.NAME & ":" & E.VALUE & VBCRLF Next End End With Nextend Sub

Private sub fascist1_click () Call getProcessoridend Sub

转载请注明原文地址:https://www.9cbs.com/read-41273.html

New Post(0)