|
Imports Microsoft.Win32
Public Class Form1
' ******************************************************
' 画面初期設定
' ******************************************************
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim regkey As RegistryKey
' レジストリキーを開く
regkey = Registry.LocalMachine.OpenSubKey( _
"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", False)
Dim str As String
' 規定のデータを取得する
str = CType(regkey.GetValue("", "値無し"), String)
MessageBox.Show(str)
' 特定のデータを取得する
str = CType(regkey.GetValue("IMJPMIG9.0", "値無し"), String)
MessageBox.Show(str)
' レジストリキーを閉じる
regkey.Close()
End Sub
End Class
| |