»áÔ±£º ÃÜÂ룺 ¡¡Ãâ·Ñ×¢²á | Íü¼ÇÃÜÂë | »áÔ±µÇ¼ ÍøÒ³¹¦ÄÜ£º ¼ÓÈëÊÕ²Ø ÉèΪÊ×Ò³ ÍøÕ¾ËÑË÷  
¼¼ÊõÎĵµ > VBÎĵµ > ϵͳ¿ØÖÆ
»ñÈ¡CPUµÄID
·¢±íÈÕÆÚ£º2002-09-13 00:00:00×÷ÕߣºÀ ³ö´¦£º  

'ÒýÓÃMicrosoft VMI s cripting 1.1 Library

'ÔÚ´°ÌåÉϽ¨Ò»¸öText£¬ÃüÃûΪText1£¬²¢ÇÒ

'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 If

   End With

 Next

End Sub

Private Sub Form_Load()

 GetProcessorID

End Sub

¡¾·µ»Ø¶¥²¿¡¿ ¡¾´òÓ¡±¾Ò³¡¿ ¡¾¹Ø±Õ´°¿Ú¡¿

¹ØÓÚÎÒÃÇ / ¸øÎÒÁôÑÔ / °æȨ¾Ù±¨ / Òâ¼û½¨Òé / ÍøÕ¾±à³ÌQQȺ   
Copyright ©2003- 2024 Lihuasoft.net webmaster(at)lihuasoft.net ¼ÓÔØʱ¼ä 0.0042