Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9051811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:00:23+00:00 2026-06-16T13:00:23+00:00

I have got problem with reloading proxy settings in IE. I want to reload

  • 0

I have got problem with reloading proxy settings in IE. I want to reload proxy options without restarting IE and Chrome. I’ve notice that InternetSetOption returns false.

Definitions:

Private Declare Auto Function InternetSetOption Lib "wininet.dll" (ByVal hInternet As IntPtr, ByVal dwOption As Integer, ByVal lpBuffer As IntPtr, ByVal lpdwBufferLength As Integer) As Boolean

Private Const INTERNET_OPTION_REFRESH As Long = 37
Private Const INTERNET_OPTION_SETTINGS_CHANGED As Long = 39

And inside function:

InternetSetOption(vbNull, INTERNET_OPTION_SETTINGS_CHANGED, vbNull, 0)
InternetSetOption(vbNull, INTERNET_OPTION_REFRESH, vbNull, 0)

Here is whole function:

Public Sub SetProxy() 'ByVal ServerName As String, ByVal port As Integer
    Dim regkey1 As RegistryKey
    regkey1 = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Internet Settings", RegistryKeyPermissionCheck.Default)
    regkey1.SetValue("ProxyServer", "ftp=10.8.0.1:808;http=10.8.0.1:808;https=10.8.0.1:808;socks=10.8.0.1:1080", RegistryValueKind.Unknown)
    regkey1.SetValue("ProxyEnable", True, RegistryValueKind.DWord)
    regkey1.Close()

    Dim regKey7 As RegistryKey
    regKey7 = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections", RegistryKeyPermissionCheck.Default)


    Dim regKe As Object = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections", True).GetValue("DefaultConnectionSettings")
    If regKe Is Nothing Then
    Else
        regKey7.DeleteValue("DefaultConnectionSettings")
    End If

    Dim regk As Object = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections", True).GetValue("SavedLegacySettings")
    If regk Is Nothing Then
    Else
        regKey7.DeleteValue("SavedLegacySettings")
    End If

    regKey7.Close()

    InternetSetOption(vbNull, INTERNET_OPTION_SETTINGS_CHANGED, vbNull, 0)
    InternetSetOption(vbNull, INTERNET_OPTION_REFRESH, vbNull, 0)

    Label1.Text = "Connected to Disa's Proxy Server"
    Label1.ForeColor = Color.Green



End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T13:00:24+00:00Added an answer on June 16, 2026 at 1:00 pm

    You need to change the vbnulls to IntPtr.Zero. This should correct the problem.

    Imports System
    Imports System.Runtime.InteropServices
    
    Namespace UpdateProxy
        Friend Class Program
            Public Shared Declare Auto Function InternetSetOption Lib "wininet.dll" (hInternet As IntPtr, dwOption As Integer, lpBuffer As IntPtr, dwBufferLength As Integer) As Boolean
    
            Private Shared Sub Main(args As String())
                Program.InternetSetOption(IntPtr.Zero, 39, IntPtr.Zero, 0)
                Program.InternetSetOption(IntPtr.Zero, 37, IntPtr.Zero, 0)
            End Sub
        End Class
    End Namespace
    

    This simple program will update running instances of IE with the proxy settings from the registry.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got a performance problem about TextField.htmlText +=msg .And I know that TextField.appendText(msg)
I have got a problem to get back a parameter from my view to
I have got a problem with calling a global function, which takes a pointer
I have got a strange problem about in_array recently which I cannot understand. e.g.
I have got very big problem because I would like to get more information
I have got a the following problem: I have got multi-step form where in
The problem is: I have got a table of columns (A, B, C) where
I have problem with context menu. I have got: @Override public void onCreateContextMenu(ContextMenu menu,
have a nice day. I got problem when trying to create an image from
I'm getting crazy with this problem: I have got some Oracle SQL-Reports to redesign

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.