frmserialregedit.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:3k
- Imports System.Security.Cryptography
- Imports Microsoft.Win32
- Public Class frmserialregedit
- Inherits System.Windows.Forms.Form
- Public regeditvalue As String
- #Region " Windows 窗体设计器生成的代码 "
- Public Sub New()
- MyBase.New()
- '该调用是 Windows 窗体设计器所必需的。
- InitializeComponent()
- '在 InitializeComponent() 调用之后添加任何初始化
- End Sub
- '窗体重写 dispose 以清理组件列表。
- Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing Then
- If Not (components Is Nothing) Then
- components.Dispose()
- End If
- End If
- MyBase.Dispose(disposing)
- End Sub
- 'Windows 窗体设计器所必需的
- Private components As System.ComponentModel.IContainer
- '注意: 以下过程是 Windows 窗体设计器所必需的
- '可以使用 Windows 窗体设计器修改此过程。
- '不要使用代码编辑器修改它。
- Friend WithEvents btnregedit As System.Windows.Forms.Button
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.btnregedit = New System.Windows.Forms.Button
- Me.SuspendLayout()
- '
- 'btnregedit
- '
- Me.btnregedit.Location = New System.Drawing.Point(104, 64)
- Me.btnregedit.Name = "btnregedit"
- Me.btnregedit.Size = New System.Drawing.Size(104, 32)
- Me.btnregedit.TabIndex = 0
- Me.btnregedit.Text = "写入注册表"
- '
- 'frmserialregedit
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)
- Me.ClientSize = New System.Drawing.Size(478, 310)
- Me.Controls.Add(Me.btnregedit)
- Me.Name = "frmserialregedit"
- Me.Text = "frmserialregedit"
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnregedit.Click
- SetUp()
- End Sub
- Sub SetUp()
- Dim SetUp As RegistryKey
- SetUp = Registry.LocalMachine.CreateSubKey("SOFTWAREJxcDFT StudioRegister")
- SetUp = Registry.LocalMachine.OpenSubKey("SOFTWAREJxcDFT StudioRegister", True)
- SetUp.SetValue("State", "aBcfvdgv")
- SetUp.Close()
- End Sub
- Private Sub readregedit()
- Dim State As RegistryKey
- State = Registry.LocalMachine.OpenSubKey("SOFTWAREJxcDFT StudioRegister")
- Dim StateValue As String
- Try
- StateValue = State.GetValue("State")
- Catch
- End Try
- regeditvalue = StateValue
- End Sub
-
- End Class