Private Sub Command1_Click()
'建立键值
CreateNewKey HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx"
CreateNewKey HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound"
'MySamples\Samples1下建立一个字符串值和一个整数值
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "AppID1", 101, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "AppID2", 102, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "AppID3", 103, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "AutoRefresh", 1, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Background", 1, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "BuddyIP", "127.0.0.1", REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "ChannelName", 0, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Effect3D", 2, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "EffectVolume", 95, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "GameName", 0, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "IP", "127.0.0.1", REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Language", 1, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "LastID", 0, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Location", fname & App.Path, REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "MidiMode", 1, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "MouseSpeed", 50, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "MusicVolume", 95, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "port", 8372, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Screen", fname & App.Path, REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "ShootingMode", 0, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Version", 312, REG_DWORD
End Sub
Private Sub Form_Load()
strPath = App.Path
Text1 = strPath
Dim fname As String
If Right(App.Path, 1) = "\" Then
fname = App.Path
Else
fname = App.Path & "\"
End If
'建立键值
CreateNewKey HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx"
CreateNewKey HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound"
'MySamples\Samples1下建立一个字符串值和一个整数值
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "AppID1", 101, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "AppID2", 102, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "AppID3", 103, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "AutoRefresh", 1, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Background", 1, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "BuddyIP", "127.0.0.1", REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "ChannelName", 0, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Effect3D", 2, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "EffectVolume", 95, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "GameName", 0, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "IP", "127.0.0.1", REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Language", 1, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "LastID", 0, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Location", Text1 & App.Path, REG_SZ
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "MidiMode", 1, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "MouseSpeed", 50, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "MusicVolume", 95, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "port", 8372, REG_DWORD
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "ShootingMode", 0, REG_BINARY
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Version", 312, REG_DWORD
End Sub
Private Sub Label1_Click()
End Sub
谁能帮帮忙啊~~修改不注册表路径不支持中文啊~~~
文件路径如果是中文的话显示就不完全啊~~~
各位大哥大姐帮帮啊
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\SoftNyx\GunBound", "Location", Text1 & App.Path, REG_SZ
就是这一项是修改文件路径的~~~
我已经把源代码传上来了~~~