borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (TIMER QUESTION!!!)Next Topic (Error line number) New Topic New Poll Post Reply
AndreaVB Forum : VB General : Registry in VB 4
Poster Message
millerdraft
Level: Scholar

Registered: 01-02-2003
Posts: 41

icon 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!

24-02-2003 at 04:26 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
win_dir
Level: VB Guru

Registered: 04-08-2002
Posts: 390
icon Re: Registry in VB 4

i could've misunderstood you but anyway here goes.

would you like an easy way? when i'm dealing with the registry i always use the ITM registry control which i think is free for all uses and as well as basic registry functions it can also connect to other computers registries which can sometimes be quite useful and saving and retrieving the data from REGEDIT4 files. This is a perfect choice unless your really desparate to save 300Kbytes of space in your final package, i.e your making an ActiveX control or something that needs to be quick. the link to this control is http://download.com.com/3000-2070-2376961.html?tag=lst-0-1

p.s. this should work with VB4 although i have not tested it. if it comes up with errors you may want to have a look at the documentation included for how to implement it.

[Edited by win_dir on 25-02-2003 at 05:02 PM GMT]

____________________________
We have a Mustek 5 M/Pix GSm@rt USB Digital Camera
for just £74.03 , offer only on until 30th February!

<AllDuck.com>      

Enquiries/Sales: 0845 430 9862
Fax: 0870 950 4532

25-02-2003 at 04:57 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : Registry in VB 4
Previous Topic (TIMER QUESTION!!!)Next Topic (Error line number) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder