현재 위치 - 중국 분류 정보 발표 플랫폼 - 비즈니스 서비스 정보 - VB 프로그램에는 전문가의 답변이 필요합니다

VB 프로그램에는 전문가의 답변이 필요합니다

WMI를 사용하면 하드웨어/소프트웨어 정보에 쉽게 액세스할 수 있습니다.

양식에 목록 상자를 삽입한 다음 코드를 작성합니다.

Private Sub Form_Load()

오류 발생 시 다음 재개

Dim objWMIService, colItems, objItem

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")

Set colItems = objWMIService.ExecQuery("Win32_Processor에서 * 선택", , 48)

List1.AddItem "CPU 세부 정보"

List1.AddItem "---- --- ---------"

colItems의 각 objItem에 대해

List1.AddItem "AddressWidth: " & objItem.AddressWidth

List1.AddItem "아키텍처: " & objItem.Architecture

List1.AddItem "가용성: " & objItem.Availability

List1.AddItem "캡션: " & objItem.Caption

List1.AddItem "ConfigManagerErrorCode: " & objItem.ConfigManagerErrorCode

List1.AddItem "ConfigManagerUserConfig: " & objItem.ConfigManagerUserConfig

List1.AddItem "CpuStatus: " & objItem. p>

List1.AddItem "CreationClassName: " & objItem.CreationClassName

List1.AddItem "CurrentClockSpeed: " & objItem.CurrentClockSpeed

List1.AddItem "CurrentVoltage: " & objItem .CurrentVoltage

List1.AddItem "DataWidth: " & objItem.DataWidth

List1.AddItem "설명: " & objItem.Description

List1.AddItem "DeviceID : " & objItem.DeviceID

List1.AddItem "ErrorCleared: " & objItem.ErrorCleared

List1.AddItem "ErrorDescription: " & objItem.ErrorDescription

< p>List1 .AddIte

m "ExtClock: " & objItem.ExtClock

List1.AddItem "Family: " & objItem.Family

List1.AddItem "InstallDate: " & objItem.InstallDate

< p> List1.AddItem "L2CacheSize: " & objItem.L2CacheSize

List1.AddItem "L2CacheSpeed: " & objItem.L2CacheSpeed

List1.AddItem "LastErrorCode: " & objItem.LastErrorCode< /p>

List1.AddItem "레벨: " & objItem.Level

List1.AddItem "LoadPercentage: " & objItem.LoadPercentage

List1.AddItem "제조업체: " & objItem.Manufacturer

List1.AddItem "MaxClockSpeed: " & objItem.MaxClockSpeed

List1.AddItem "이름: " & objItem.Name

List1.AddItem " OtherFamilyDescription: " & objItem.OtherFamilyDescription

List1.AddItem "PNPDeviceID: " & objItem.PNPDeviceID

List1.AddItem "PowerManagementCapabilities: " & objItem.PowerManagementCapabilities

List1.AddItem "PowerManagementSupported: " & objItem.PowerManagementSupported

List1.AddItem "ProcessorId: " & objItem.ProcessorId

List1.AddItem "ProcessorType: " & objItem.ProcessorType

List1.AddItem "개정: " & objItem.Revision

List1.AddItem "역할: " & objItem.Role

List1.AddItem "SocketDesignation: " & objItem. SocketDesignation

List1.AddItem "상태: " & objItem.Status

List1.AddItem "StatusInfo: " & objItem.StatusInfo

List1.AddItem "Stepp

ing: " & objItem.Stepping

List1.AddItem "SystemCreationClassName: " & objItem.SystemCreationClassName

List1.AddItem "SystemName: " & objItem.SystemName

List1.AddItem "UniqueId: " & objItem.UniqueId

List1.AddItem "UpgradeMethod: " & objItem.UpgradeMethod

List1.AddItem "버전: " & objItem.Version

List1.AddItem "VoltageCaps: " & objItem.VoltageCaps

List1.AddItem "---------------"

다음

List1.AddItem "메모리 세부 정보"

List1.AddItem "----------------"

설정 colItems = objWMIService.ExecQuery("Win32_PhysicalMemory에서 * 선택", , 48)

colItems의 각 objItem에 대해

List1.AddItem "BankLabel: " & objItem.BankLabel

List1.AddItem "용량: " & objItem.Capacity

List1.AddItem "캡션: " & objItem.Caption

List1.AddItem "CreationClassName: " & objItem.

List1.AddItem "DataWidth: " & objItem.DataWidth

List1.AddItem "Description: " & objItem.Description

List1.AddItem "DeviceLocator: " & objItem.DeviceLocator

List1.AddItem "FormFactor: " & objItem.FormFactor

List1.AddItem "HotSwappable: " & objItem.HotSwappable

List1. "InstallDate: " & objItem.InstallDate

List1.AddItem "InterleaveDataDepth: " & objItem.InterleaveDataDepth

List1.AddItem "InterleavePosition: " & objItem.InterleavePosition

p>

List1.AddItem "제조업체: " & objItem.Manufacturer

List1.AddItem "MemoryType: " & objItem.MemoryType

List1.AddItem "모델: " & objItem .Model

List1.AddItem "이름: " & objItem.Name

List1.AddItem "OtherIdentifyingInfo: " & objItem.OtherIdentifyingInfo

List1.AddItem "PartNumber : " & objItem.PartNumber

List1.AddItem "PositionInRow: " & objItem.PositionInRow

List1.AddItem "PoweredOn: " & objItem.PoweredOn

List1 .AddItem "제거 가능: " & objItem.Removable

List1.AddItem "교체 가능: " & objItem.Replaceable

List1.AddItem "일련 번호: " & objItem.SerialNumber

List1.AddItem "SKU: " & objItem.SKU

List1.AddItem "Speed: " & objItem.Speed

List1.AddItem "상태: " & objItem.Status

List1.AddItem "태그: " & objItem.Tag

List1.AddItem "TotalWidth: " & objItem.TotalWidth

List1.AddItem "TypeDetail: " & objItem.TypeDetail

List1.AddItem "버전: " & objItem.Version

List1.AddItem "---------------"< /p>

다음

List1.AddItem "그래픽 카드 정보"

List1.AddItem "----------------" < /p>

Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory", , 48)

colItems의 각 objItem에 대해

List1.AddItem "VideoProcessor: " & objItem.VideoProcessor

List1.AddItem "---------------"

다음

자세한 내용은 (이해가 안되면 구글을 열어보세요.

e 번역)

/library/aa394587