Results 1 to 9 of 9

Thread: how i can add and edit of regedit by vb6

  1. #1

    Thread Starter
    Banned
    Join Date
    Oct 2007
    Posts
    54

    how i can add and edit of regedit by vb6

    hi
    how i can add and edit of regedit by vb6.

  2. #2
    Frenzied Member aikidokid's Avatar
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    1,968

    Re: how i can add and edit of regedit by vb6

    Take a look here in the CodeBank
    If somebody helps you, take time to RATE the post. I do.

    "FAILURE IS NOT AN OPTION. It comes bundled with the software."

    Below are some of the threads that have helped me along the way:

    CodeBank submission:
    Listview Backcolor (without subclassing)

    Loading Treeview Nodes From A Database, Creating Registry Keys, Count Number of Lines in TextBox , Excellent RichTextBox Tricks & Tips
    Ideas & Screen Shots For A Code Library App
    How to do Data validation in Excel, Conditional Formating in Excel

  3. #3
    Lively Member amolt's Avatar
    Join Date
    Aug 2006
    Location
    INDIA
    Posts
    80

    Thumbs up Re: how i can add and edit of regedit by vb6

    Hii ...
    If u want to save some of your settings in registry with VB6 .. then you have to use internal functional given by VB6 as - for saving your application information in registry use : function SaveSetting and for reading these setting from registry use: function GetSetting.

    Also if you want to read the whole registry then you must need to go for use of Win APIs.

    Some of API declaration as:

    Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
    Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
    Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
    Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
    Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long


  4. #4
    Frenzied Member aikidokid's Avatar
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    1,968

    Re: how i can add and edit of regedit by vb6

    Quote Originally Posted by amolt
    function SaveSetting and for reading these setting from registry use: function GetSetting
    That's what is in the link I posted

    IYADo, also take a look at the link in my signature, below, titled Creating registry Keys
    If somebody helps you, take time to RATE the post. I do.

    "FAILURE IS NOT AN OPTION. It comes bundled with the software."

    Below are some of the threads that have helped me along the way:

    CodeBank submission:
    Listview Backcolor (without subclassing)

    Loading Treeview Nodes From A Database, Creating Registry Keys, Count Number of Lines in TextBox , Excellent RichTextBox Tricks & Tips
    Ideas & Screen Shots For A Code Library App
    How to do Data validation in Excel, Conditional Formating in Excel

  5. #5

    Thread Starter
    Banned
    Join Date
    Oct 2007
    Posts
    54

    Re: how i can add and edit of regedit by vb6

    look aT THIS CODE IT DOSENT MAKE IT WORK
    Code:
    Private Sub Form_Load()
    
    Dim Kalong
    
    Set Kalong = CreateObject("WScript.Shell")
    Kalong.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Winlogon\LegalNoticeCaption", "kiss"
    Kalong.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Winlogon\LegalNoticeText", "0000000000000"
    End Sub

  6. #6
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: how i can add and edit of regedit by vb6

    Did you even consider to look into the link posted by aikidokid?
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: how i can add and edit of regedit by vb6

    What happens when you run it?

    A typical question for you, exactly what is it that you are trying to do? Please be specific.

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,900

    Re: how i can add and edit of regedit by vb6

    did you add a reference to microsoft scripting runtime?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  9. #9
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: how i can add and edit of regedit by vb6

    Also: ....
    Code:
      = WScript.CreateObject(....
    and

    http://msdn2.microsoft.com/en-us/library/yfdfhz1b.aspx

    *sigh* We can't make it any clearer for you than this. (No, I'm not going to write the prog for you)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width