millerdraft Level: Scholar
 Registered: 01-02-2003 Posts: 41
|
Registry in VB 4
Does anyone know VB 4 well. I have this registry command that works in 6 but I need it to work in vb 4 for a specific program that I am working on. Here is the code that I can't get to work in 4.
'***************
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As _
String, ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'My resizing class for sizing controls
Dim instr As String
Dim appvalue, i
Dim notevalue
Dim startheight
Dim startwidth
Dim testing
Dim screennum
Dim emaildomain As String
Dim emaildelete As Boolean
Dim keyname As String
Dim ckeyname As String
Dim keystring As String
Dim keydata As String
Dim keybase As String
Dim keylast As String
Dim keycnt As Integer
Dim crrtn As Integer
Dim emailcon As Boolean ' true = dialup
'********************
'********************
Private Sub regdel()
'This creates a new key in the users registry.
Dim numlen
Dim lead
Dim retval As String
keybase = "HKEY_CURRENT_USERSoftwareMicrosoftInternet Account ManagerAccounts"
For keycnt = 1 To 200
keylast = ConvertNum(keycnt, 10, 16) ' convert base 10 to 16
numlen = 8
retval = ""
For lead = 1 To numlen - Len(keylast)
retval = retval & "0"
Next lead
keylast = retval & keylast
' MsgBox "calc " + keylast
keyname = keybase + keylast
ckeyname = keyname
DeleteKey ckeyname
' MsgBox "Deleted " + keyname
Next keycnt
End Sub
'**********************
Thanks
Ted
____________________________
Ted Moe
I wish I was real good at this stuff!
|