473,803 Members | 3,619 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

enable disable proxy

Hi aLL

how can I do to enable and disable IE proxy just in one clik button with
Visual Basic please.

thank you.
Nov 30 '07 #1
3 10266
The web link below is for VB6 (if God forbid you are using it).
http://www.vb-helper.com/howto_detect_ie_proxy.html

The web link below is for VB.Net: The following article is directly
from that page.
http://www.vb-helper.com/howto_net_detect_ie_proxy.html

Internet Explorer lets you specify proxy settings. In the Tools menu,
select Internet Options. Select the Connections tab and click the LAN
Settings button. The goal is to figure out if the box indicated by the arrow
in the picture is checked.
Function InternetProxyEn abled looks at the Registry key
HKEY_CURRENT_US ER\Software\Mic rosoft\Windows\ CurrentVersion\ Internet
Settings. If the value of ProxyEnable is not 0, then the box is checked.

' Return True if the internet settings has ProxyEnable =
' True.
Private Function InternetProxyEn abled() As Boolean
' See if Internet Explorer uses a proxy.
Dim key As RegistryKey = _
Registry.Curren tUser.OpenSubKe y( _
"Software\\Micr osoft\\Windows\ \CurrentVersion \\Internet " & _
"Settings")
Dim keys() As String = key.GetValueNam es()
Dim result As Boolean = _
(CInt(key.GetVa lue("ProxyEnabl e", 0)) <0)
key.Close()

Return result
End Function
"bobleponge " <bo********@gma il.comwrote in message
news:01******** **************@ news.astraweb.c om...
Hi aLL

how can I do to enable and disable IE proxy just in one clik button with
Visual Basic please.

thank you.

Nov 30 '07 #2
Hosmerica wrote:
"bobleponge " <bo********@gma il.comwrote in message
news:01******** **************@ news.astraweb.c om...
>Hi aLL

how can I do to enable and disable IE proxy just in one clik button with
Visual Basic please.

The web link below is for VB6 (if God forbid you are using it).
http://www.vb-helper.com/howto_detect_ie_proxy.html

The web link below is for VB.Net: The following article is directly
from that page.
http://www.vb-helper.com/howto_net_detect_ie_proxy.html

Internet Explorer lets you specify proxy settings. In the Tools menu,
select Internet Options. Select the Connections tab and click the LAN
Settings button. The goal is to figure out if the box indicated by the arrow
in the picture is checked.
Function InternetProxyEn abled looks at the Registry key
HKEY_CURRENT_US ER\Software\Mic rosoft\Windows\ CurrentVersion\ Internet
Settings. If the value of ProxyEnable is not 0, then the box is checked.
While you can probably read the setting this way, I doubt it will take
immediate affect.
The proper way is via the Inet API but I don't know the exact calls.

--
Dean Earley (de*********@ic ode.co.uk)
i-Catcher Development Team

iCode Systems
Nov 30 '07 #3

"Dean Earley" <de*********@ic ode.co.ukwrote in message
news:47******** *************** @news.zen.co.uk ...
Hosmerica wrote:
>"bobleponge " <bo********@gma il.comwrote in message
news:01******* *************** @news.astraweb. com...
>>Hi aLL

how can I do to enable and disable IE proxy just in one clik button with
Visual Basic please.

The web link below is for VB6 (if God forbid you are using it).
http://www.vb-helper.com/howto_detect_ie_proxy.html

The web link below is for VB.Net: The following article is
directly from that page.
http://www.vb-helper.com/howto_net_detect_ie_proxy.html

Internet Explorer lets you specify proxy settings. In the Tools
menu, select Internet Options. Select the Connections tab and click the
LAN Settings button. The goal is to figure out if the box indicated by
the arrow in the picture is checked.
Function InternetProxyEn abled looks at the Registry key
HKEY_CURRENT_U SER\Software\Mi crosoft\Windows \CurrentVersion \Internet
Settings. If the value of ProxyEnable is not 0, then the box is checked.

While you can probably read the setting this way, I doubt it will take
immediate affect.
The proper way is via the Inet API but I don't know the exact calls.
You're probably right. The two namespaces that come to mind are System.Net
and System.Web. System.Net.WebP roxy looks promising.
Nov 30 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2151
by: Carl Waldbieser | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** When using urllib2.urlopen() on my Windows 2000 machine at work, I was puzzled that I kept getting back authentication errors from our Internet proxy server (I was trying to contact an internal machine). Upon digging into the code a little, I found that urllib2 was pulling the proxy information out of the Windows registry (Internet Explorer uses these settings). However,...
3
15967
by: Alphonse Giambrone | last post by:
I am trying to enable/disable a requiredfieldvalidator on the client side and am generating an error. I had found some documentation on validation which states that I should be able to enable/disable validators on the client side. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspplusvalid.asp According to it and the little other info I was able to find, the way to accomplish what I want it to call...
3
3802
by: DBQueen | last post by:
I have a form with lines of controls. On some of the lines there are 3 controls (call them A,B,C); other lines have only control A. The controls have been numbered sequentially (Q20, Q21....Q76) and they were put onto the form in the numerical sequence. I have given the A's with B & C's on the same line a tag=1; B.tag=2, C,tag=2) I am trying to write 2 modules so that the following occurs (on Form_Current and 'A' Control_Before or...
0
2425
by: talal | last post by:
How to check whether javascript is enable or disable in client browser. Remeber i can check wheter browser client support javascript with BrowserCapability class. But what if the client has disable from security setting in a browser. Tell me is there any class like browserCapability in asp.net to check wheter javascript is enable or disable. Please dont tell me the html way or do some javascript because i have to apply this code into...
4
10774
by: mabond | last post by:
Does anyone know some code that will allow me to enable and/or disable a task which already exists in the task scheduer. I have a task which runs at 15 min intervals and from time to time I want to disable (and later enable) that task. I'd like to do so programatically as part of another application instead of opening the task scheduler and right clicking on the relevant task. Any guidance or suggestions for code would be appreciated ...
2
8917
by: RootSpy2006 | last post by:
Hi All, Problem Definition: --------------------- Microsoft Wirelss Keyboard works in BIOS but does not work when booting into windows. Discovered Work-around: ----------------------------- 1.> Open Device Manager(The keyboard device will have an exclamation and
8
34464
by: rongchaua | last post by:
Hi all, i would like now to disable and enable network adapter programmatically with c#. I have searched but found nothing useful. There's no topic about this problem. Has someone done with this problem? All help will be appreciated. rongchaua.
3
11666
by: Pietro | last post by:
Hi all, First of all I'd like to thank you very very much ,as finally after many years of searching,I could find a code to disable/enable the shift key,but actually i cannot use the code as I'm very new to VBA,i tried to follow the instructions reported in the code,but i got no result,i still can use the shift key,can you explain in details how to use it correctly to enable/disable users from pressing shift key to view database windw?,the...
2
4386
by: Naushad | last post by:
Hi all, I am using the countinous form. I want to Enable/Disable the some fields for perticular records as per the following condition when open the form. I have written this code in "On Current Event". I go on the perticular record its enable/dosable the following field for all records. I have tried this code in "On Open Even" but there is no effect. Please help me to solve this problem.
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9566
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10555
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9127
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2974
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.