参照
System
System.Core
System.Data
System.Data.DataSetExtensions
System.Deployment
System.Drawing
System.Windows.Forms
System.Xml
System.Xml.Linq
<デザイン状況>
ボタンを一つ用意している簡素なデザインにしています
VB2008
1Imports System.Management 2 3 Public Class Form1 4 'http://rucio.cloudapp.net/ThreadDetail.aspx?ThreadId=2554 5 6 Private Sub ProcTemp(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTemp.Click 7 Try 8 Dim searcher As New ManagementObjectSearcher("root\WMI", "SELECT * FROM MSAcpi_ThermalZoneTemperature") 9 For Each queryObj As ManagementObject In searcher.Get() 10 Dim temp As Double = CDbl(queryObj("CurrentTemperature")) 11 temp = (temp - 2732) / 10.0 12 MessageBox.Show(temp.ToString) 13 Next 14 Catch ex As ManagementException 15 MessageBox.Show(ex.Message) 16 End Try 17 End Sub 18 End Class 19
弄ったところ
~~・コマンドプロンプトでWbemtest
⇒名前空間を「root\WMI」にして接続
⇒クラスの列挙から再起を選択して検索
⇒クエリ結果からMSAcpi_ThermalZoneTemperatureを選択する
⇒プロパティからCurrentTemperatureを選択して、配列にチェック(配列で出すと何かしら変換して値が出せるかもという推測)
~~
⇒Wbemtestは弄らないでください!!!!!
<状況>
⇒上記が弄り終わった後、VS2008のvb実行
⇒「アクセスが拒否されました」というメッセージボックスが出てくる
今の段階、このような状況です。
何卒、よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/04/05 04:38
2019/04/05 05:29
2019/04/05 05:37
2019/04/05 11:16