Results 1 to 4 of 4

Thread: Visual Basic

  1. #1
    Tech God
    Overall activity: 0%

    Join Date
    Jan 2008
    Location
    South Africa
    Posts
    1,279
    Liked
    14 times
    Points
    1,853
    I'm trying to teach myself VB but are stuck on this one thing which I can't get right. I would like to change the values of keys in the registry, which not necessarily has anything to do with the application I'm writing. From what I have read one needs to make use of advapi32.dll but I'm not sure how to do it.

    I declare the function in "Option Explicit" as follows:

    Declare Function RegReplaceKey Lib "C:\WINDOWS\System32\advapi32.dll" Alias "RegReplaceKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpNewFile As String, ByVal lpOldFile As String) As Long

    When I use the function in the code, it does not work. :rolleyes:

    Can anybody point me in the right direction please.
    I refuse to tip toe through life only to arrive safely at death

  2. #2
    Experienced User
    Overall activity: 0%

    Join Date
    May 2008
    Location
    Seattle, WA
    Posts
    1,620
    Liked
    1 times
    Points
    9,515
    This M$ site should point you there:

    http://msdn.microsoft.com/en-us/vbasic/default.aspx

    Else: registry-specific conversation here: http://www.computerhope.com/forum/index.php?topic=1691.0
    Mankind hates what it fears, and fears what it cannot understand.
    Therefore, hatred is a by-product of ignorance!

  3. #3
    Tech God
    Overall activity: 0%

    Join Date
    Jan 2008
    Location
    South Africa
    Posts
    1,279
    Liked
    14 times
    Points
    1,853
    Polkadot you're the man. Thanks a lot, computerhope.com has a wealth of information and did the trick for me. :)

  4. #4
    Experienced User
    Overall activity: 0%

    Join Date
    May 2008
    Location
    Seattle, WA
    Posts
    1,620
    Liked
    1 times
    Points
    9,515
    Sometimes Computerhope is way out of date (I think they still concider XP a new OS). But it is often a good place to do a search. I just did a search on "Visual Basic" and it came up with (among other things) that thread on registry values. Glad it worked for you.

 

 

Similar Threads

  1. Help Regarding MS Visual studio 2008.
    By allwin.m007 in forum General Forum
    Replies: 7
    Last Post: 12-03-2011, 08:54 PM
  2. Replies: 1
    Last Post: 07-20-2010, 04:05 PM
  3. how to share my visual basic program online
    By edwinonia in forum Network
    Replies: 3
    Last Post: 03-22-2010, 05:06 AM
  4. Visual basic (vb) prob
    By azharsairon in forum General Forum
    Replies: 2
    Last Post: 09-13-2009, 05:38 AM
All times are GMT +8. The time now is 05:09 AM.