Results 1 to 3 of 3

Thread: URGENT - AGAIN - Small Question/Easy code [for you at least]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Posts
    395

    URGENT - AGAIN - Small Question/Easy code [for you at least]

    I have a program that contains some code using the WebBrowser control.

    I need to know how to change IE connection settings via the registry in VB6.

    Lets assume I have a text box [Text1.Text] and one command button. I want to be able to paste/type in a proxyort and hit the command button and have it set the proxy in the registry.

    Thanks in advance!

    I was told to search the forums for "Registry" in my last thread which wasn't helpful at all. Please provide me with instructions on how to do this.

    This is the code i have so far - but i dont have any kind of module -
    VB Code:
    1. WriteToRegistry "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer," & Text32.Text 'change proxy server
    2. WriteToRegistry "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD" 'enable proxies

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: URGENT - AGAIN - Small Question/Easy code [for you at least]

    Well, searching for Registry might come up with a bit to much. Try a search for RegOpenKeyEx and/or RegSetValueEx, which are the API functions you should use to open and write to the registry. You should also write more sensible thread titles the next time you post a question in this forum . "Small Question/Easy code" doesn't say squat... "How to write to the registry?" would have been a better title.

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

    Re: URGENT - AGAIN - Small Question/Easy code [for you at least]

    If your question had been better titled you'd have probably got more help, and earlier. If you're going to play with the registry, you'll need to *understand* what you're doing. There is an old and out-of-date (but quite good) site that provides examples and explanations for many APIs. Take a look at http://www.mangovision.com/vbapi/index.html. You'll find what you need there. (I wish this site had something as comprehensive. It would be a labour of love though )
    (EDIT:- When I say "comprehensive, I mean the explanations and "how to use" )
    Last edited by schoolbusdriver; Jul 28th, 2006 at 03:08 AM.

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