|
-
Dec 12th, 2006, 03:48 AM
#1
Thread Starter
Lively Member
Manipulating Advanced Setting in IE with VB
Hi
one of the things that slows a diap up user down is pictures. is there a way to code a vb routine to turn off the pics, vids, animations, and the like, and then restore the settings to where they were just prior to the routine?
thanks
tx
-
Dec 12th, 2006, 03:53 AM
#2
Re: Manipulating Advanced Setting in IE with VB
Do a Google search for registry Internet Explorer with some of the keywords you listed; you'll probably find some information about the registry entries that you need to change and backup.
As for registry modifying, you should be able to find some nice modules in here that do the task easy enough. You just need to figure out what to modify and what are the allowed values.
-
Dec 12th, 2006, 04:36 AM
#3
Thread Starter
Lively Member
Re: Manipulating Advanced Setting in IE with VB
do you have an example of a sub turning of the pics, then turning them back on?
tx
-
Dec 12th, 2006, 04:41 AM
#4
Re: Manipulating Advanced Setting in IE with VB
No; as I haven't a need for anything IE related, I don't have code for doing that. And I'd rather just make a guide for a user to disable the settings as they please. My post only redirected you to look for the information yourself, as I'm sure this issue is covered on the vast lands of Internet. But you probably can't find it done for VB6, so you'll have to learn two separate things: what to modify in the registry, and how to read and modify registry in VB6.
(Sidetrack problems include permission issues, as registry editing can be turned off for some users in which case you can't do changes to IE settings. Some virus software can also block such actions automatically.)
-
Dec 12th, 2006, 04:51 AM
#5
Thread Starter
Lively Member
Re: Manipulating Advanced Setting in IE with VB
yeah, well, my progs do heavy IE navigation (so the user doesnt have to). it'd be convenient to be avle to have a little snip of code at the start of the routine that said "turn off IE pics" abd at the end "turn pics back on" This saves the user from having to monkey with the settings and allows for the fastest interaction with the various sites
-
Dec 12th, 2006, 05:47 AM
#6
Thread Starter
Lively Member
Re: Manipulating Advanced Setting in IE with VB
figured it out
Code:
Private Function Registry_Read(Key_Path, Key_Name) As Variant
On Error Resume Next
Dim Registry As Object
Set Registry = CreateObject("WScript.Shell")
Registry_Read = Registry.RegRead(Key_Path & Key_Name)
End Function
Private Sub Test()
MsgBox Registry_Read("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Display Inline Images")
End Sub
Private Sub Registry_Write(Key_Path As String, Key_Name As String, Key_Value As Variant, Optional Key_Type As String)
On Error Resume Next
Dim Registry As Object
Dim Registry_Value As Variant
Set Registry = CreateObject("WScript.Shell")
Registry_Value = Registry_Read(Key_Path, Key_Name)
If Key_Type = "" Then
Registry.RegWrite Key_Path & Key_Name, Key_Value
Else
Registry.RegWrite Key_Path & Key_Name, Key_Value, Key_Type
End If
End Sub
Private Sub disable()
On Error GoTo EH
Registry_Write "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Display Inline Images", "no", "REG_SZ"
Registry_Write "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Display Inline Videos", "no", "REG_SZ"
Registry_Write "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Play_Animations", "no", "REG_SZ"
Registry_Write "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Play_Background_Sounds", "no", "REG_SZ"
Exit Sub
EH:
MsgBox "Unable to revise your IE settings. Please do it manually"
Exit Sub
End Sub
Private Sub enable()
On Error GoTo EH
Registry_Write "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Display Inline Images", "yes", "REG_SZ"
Registry_Write "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Display Inline Videos", "yes", "REG_SZ"
Registry_Write "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Play_Animations", "yes", "REG_SZ"
Registry_Write "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\", "Play_Background_Sounds", "yes", "REG_SZ"
Exit Sub
EH:
MsgBox "Unable to revise your IE settings. Please do it manually"
Exit Sub
End Sub
Much easier than i thought it would be.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|