Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IE Add-ons?

1 view
Skip to first unread message

Karl E. Peterson

unread,
Nov 28, 2007, 12:41:34 PM11/28/07
to
Hi Folks -

Anyone here ever done an IE add-on with Classic VB? Know of any resources out
there? I have
someone asking if I'm interested in doing one, and I'm worried it's a potential
quagmire.

Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org


Kevin Provance

unread,
Nov 28, 2007, 1:16:14 PM11/28/07
to
I believe Steve Easton has done one. Hopefully he'll check in and confirm
this.

- Kev

"Karl E. Peterson" <ka...@mvps.org> wrote in message
news:u8DsrXeM...@TK2MSFTNGP05.phx.gbl...

Steve Easton

unread,
Nov 28, 2007, 4:24:00 PM11/28/07
to
Yep, but not an addin in the sense that it shows in the addins section.

Vista is a pita though.

Example, in a project with a reference to Microsoft Internet Controls ( ShDocVw.dll )

Option Explicit
Dim strAddress as String
Dim WithEvents IE As ShDocVw.InternetExplorer
Private Sub Command_Click()
strAddress = "http://www.google.com"

Set IE = New ShDocVw.InternetExplorer
IE.Navigate (strAddress)
IE.Visible = True
IE.RegisterAsBrowser = True
End Sub

Private Sub IE_OnQuit()
Unload Me
End Sub

Compile the above and launch it in Vista.
The program will open and instantly close because Vista opens
and closes a hidden instance of IE when launched via a program.

However, use Run as Administrator to launch the app and IE will open
and display Google just fine.
However, When launched using as administrator, IE protected mode is Off.
Which is not good.

I have yet to find a workaround for launching IE with protected mode On,
when using Run as Administrator in Vista.


--

Steve Easton

"Karl E. Peterson" <ka...@mvps.org> wrote in message news:u8DsrXeM...@TK2MSFTNGP05.phx.gbl...

Karl E. Peterson

unread,
Nov 28, 2007, 4:32:30 PM11/28/07
to
Steve Easton wrote:
> Yep, but not an addin in the sense that it shows in the addins section.

Well, that's what I'm really after. Need to write something that will show up
there. I think a "Browser Helper Object" is my goal, though I'm not really sure
what the difference is between that and a "Browser Extension."

(Or am I misunderstanding you, completely?)

Steve Easton

unread,
Nov 28, 2007, 4:45:21 PM11/28/07
to
A BHO is different than what I'm trying to accomplish.
Anyway here's a link to the latest MSDN stuff on "reusing"
the browser.
http://msdn2.microsoft.com/en-us/library/aa155133.aspx

Note that the above link only has code references / samples for VB.NET and C++

My app needs to "control" an instance of IE, because it needs to know if the user has closed
the instance of IE that it has opened, to prevent the "Object has disconnected from server" error.

--

Steve Easton


"Karl E. Peterson" <ka...@mvps.org> wrote in message news:uOr7uYgM...@TK2MSFTNGP02.phx.gbl...

Steve Easton

unread,
Nov 28, 2007, 4:49:32 PM11/28/07
to
It wouldn't by any chance be one that will highlight and convert to hyperlinks,
any phone numbers in a web page would it?


--

Steve Easton


"Karl E. Peterson" <ka...@mvps.org> wrote in message news:u8DsrXeM...@TK2MSFTNGP05.phx.gbl...

Karl E. Peterson

unread,
Nov 28, 2007, 5:22:13 PM11/28/07
to
Steve Easton wrote:
> It wouldn't by any chance be one that will highlight and convert to hyperlinks,
> any phone numbers in a web page would it?

Nope, hadn't run across that one, myself. <G>

Karl E. Peterson

unread,
Nov 28, 2007, 5:31:25 PM11/28/07
to
Steve Easton wrote:
> A BHO is different than what I'm trying to accomplish.
> Anyway here's a link to the latest MSDN stuff on "reusing"
> the browser.
> http://msdn2.microsoft.com/en-us/library/aa155133.aspx

Bookmarked! Good resource.

> Note that the above link only has code references / samples for VB.NET and C++

Yeah, really nasty. I did find this in the GCache, though, and it provides a few
more clues:

http://72.14.253.104/search?q=cache:w4ZFBS3CQc8J:www.avidoffice.com/docushare/dsweb/Get/Document-2918/Builder.com%2520Add%2520functionality%2520with%2520a%2520BHO.htm+vbbho&hl=en&ct=clnk&cd=4&gl=us

> My app needs to "control" an instance of IE, because it needs to know if the user
> has closed the instance of IE that it has opened, to prevent the "Object has
> disconnected
> from server" error.

I need to create a sidebar, and "do a few things" there.

mayayana

unread,
Nov 28, 2007, 6:06:12 PM11/28/07
to
I've written a browser extension. It
was a few years ago. Something I made for
a program that only ran in Win9x. I assume
it's the same for XP but I'm not certain.
The difference between a BHO and Extension
seems to mainly be that an Extension has
a button on the menubar.

The extension wasn't terribly difficult, but it
takes some pretty funky code to set up. The
details are provided in Visual Basic Shell
Programming (O'Reilly).

Karl E. Peterson

unread,
Nov 28, 2007, 6:13:38 PM11/28/07
to
mayayana wrote:
> I've written a browser extension. It
> was a few years ago. Something I made for
> a program that only ran in Win9x. I assume
> it's the same for XP but I'm not certain.
> The difference between a BHO and Extension
> seems to mainly be that an Extension has
> a button on the menubar.

Ahhh... Any notion what a sidebar requires/uses?

> The extension wasn't terribly difficult, but it
> takes some pretty funky code to set up. The
> details are provided in Visual Basic Shell
> Programming (O'Reilly).

D'oh! Got it on the shelf. Will take a look!

mayayana

unread,
Nov 28, 2007, 9:00:18 PM11/28/07
to
>
> Ahhh... Any notion what a sidebar requires/uses?
>

I'm guessing that you mean a band object or
docking window. I haven't tried those, but they're
in the book.

The original
extension I made was fairly simple. It just called
an applet for security configuration when the
menubar button was clicked. (The idea was to
provide one of the most sorely needed features
(even to this day) for IE: The ability to quickly toggle
between customized security levels from the
browser window without needing to go through
the whole Internet Options mess.)

The way BHOs and extensions are described in
the VB book, any BHO or extension implements
IObjectWithSite to get a pointer to the current
browser instance, and with it access to the currently
loaded page.

I haven't looked at my code for some time, and
I expect you're going to figure it out quicker than
I would anyway. It appears that I just needed to
reference vbshell.tlb and provide these four
functions for basic functionality:

Private Sub IOleCommandTarget_Exec
Private Sub IOleCommandTarget_QueryStatus
Private Sub IObjectWithSite_GetSite
Private Sub IObjectWithSite_SetSite

The IOleCommandTarget_Exec event meant my
button had been clicked so I shelled my applet
in that sub.


Ken Halter

unread,
Nov 28, 2007, 10:27:24 PM11/28/07
to
"Karl E. Peterson" <ka...@mvps.org> wrote in message
news:OEH6PRhM...@TK2MSFTNGP05.phx.gbl...

>
>> The extension wasn't terribly difficult, but it
>> takes some pretty funky code to set up. The
>> details are provided in Visual Basic Shell
>> Programming (O'Reilly).
>
> D'oh! Got it on the shelf. Will take a look!
>

This /may/ be worth a download. It's a bit dated (y2k), but... who knows..

IE Webamp (How to make Explorer band addons for IE)
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=13385&lngWId=1

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm


Karl E. Peterson

unread,
Nov 29, 2007, 2:19:29 PM11/29/07
to
mayayana wrote:
>> Ahhh... Any notion what a sidebar requires/uses?
>
> I'm guessing that you mean a band object or
> docking window. I haven't tried those, but they're
> in the book.

A docking window, perhaps? I dunno, it's the "thing" that History uses, for
example.

> The original
> extension I made was fairly simple. It just called
> an applet for security configuration when the
> menubar button was clicked. (The idea was to
> provide one of the most sorely needed features
> (even to this day) for IE: The ability to quickly toggle
> between customized security levels from the
> browser window without needing to go through
> the whole Internet Options mess.)

Yeah, that is something they never implemented nicely!

> The way BHOs and extensions are described in
> the VB book, any BHO or extension implements
> IObjectWithSite to get a pointer to the current
> browser instance, and with it access to the currently
> loaded page.

Right... I sorta groked that from a few links yesterday, including source to a
typlib called vbbho.

> I haven't looked at my code for some time, and
> I expect you're going to figure it out quicker than
> I would anyway. It appears that I just needed to
> reference vbshell.tlb and provide these four
> functions for basic functionality:
>
> Private Sub IOleCommandTarget_Exec
> Private Sub IOleCommandTarget_QueryStatus
> Private Sub IObjectWithSite_GetSite
> Private Sub IObjectWithSite_SetSite
>
> The IOleCommandTarget_Exec event meant my
> button had been clicked so I shelled my applet
> in that sub.

I'm wondering if those CommandTarget "things" are only needed/related to the button?
Will probably need to find something else for this sidebar "thing" I need. (I hate
OLE interface detective work!)

Karl E. Peterson

unread,
Nov 29, 2007, 2:21:37 PM11/29/07
to
Ken Halter wrote:
> "Karl E. Peterson" <ka...@mvps.org> wrote ...

>>
>>> The extension wasn't terribly difficult, but it
>>> takes some pretty funky code to set up. The
>>> details are provided in Visual Basic Shell
>>> Programming (O'Reilly).
>>
>> D'oh! Got it on the shelf. Will take a look!
>
> This /may/ be worth a download. It's a bit dated (y2k), but... who knows..
>
> IE Webamp (How to make Explorer band addons for IE)
> http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=13385&lngWId=1

Ah-ha! Yes! That's the critter. So it is a band object I'm needing. Kewl. Now I
just gotta figure out how they're doing that.

As for it being "dated," well, you gone to Help-About in VB6 lately? <bg>

Steve Easton

unread,
Nov 29, 2007, 6:59:24 PM11/29/07
to

"mayayana" <mayaXX...@mindXXspring.com> wrote in message news:%23yflHvi...@TK2MSFTNGP05.phx.gbl...

> >
>> Ahhh... Any notion what a sidebar requires/uses?
>>
>
> I'm guessing that you mean a band object or
> docking window. I haven't tried those, but they're
> in the book.
>
> The original
> extension I made was fairly simple. It just called
> an applet for security configuration when the
> menubar button was clicked. (The idea was to
> provide one of the most sorely needed features
> (even to this day) for IE: The ability to quickly toggle
> between customized security levels from the
> browser window without needing to go through
> the whole Internet Options mess.)

Ok, maybe I'm dreaming, but IIRC as far back as IE 5 or 5.5 all
you have to do is double click the globe where it says Internet
in the right side of the status bar and the security dialog opens.

Try it.

--

Steve Easton


Karl E. Peterson

unread,
Nov 29, 2007, 7:14:55 PM11/29/07
to
Steve Easton wrote:
> Ok, maybe I'm dreaming, but IIRC as far back as IE 5 or 5.5 all
> you have to do is double click the globe where it says Internet
> in the right side of the status bar and the security dialog opens.
>
> Try it.

Doesn't happen in an IE6 machine I have here...?

Steve Easton

unread,
Nov 29, 2007, 8:04:20 PM11/29/07
to
Karl,
This page is at least 5 years old, and was created using IE 5.5 on a windows 95B machine.
Maybe even IE 5.0
http://www.95isalive.com/explorer/szonesimage.htm


--

Steve Easton


"Karl E. Peterson" <ka...@mvps.org> wrote in message news:eSerJYuM...@TK2MSFTNGP05.phx.gbl...

Larry Serflaten

unread,
Nov 29, 2007, 8:18:07 PM11/29/07
to

"Karl E. Peterson" <ka...@mvps.org> wrote

> > Ok, maybe I'm dreaming, but IIRC as far back as IE 5 or 5.5 all
> > you have to do is double click the globe where it says Internet
> > in the right side of the status bar and the security dialog opens.
>
> Doesn't happen in an IE6 machine I have here...?

You sure you tried the right one, at the bottom of the window?
It works for the IE6 I have here....

LFS


Karl E. Peterson

unread,
Nov 29, 2007, 9:27:16 PM11/29/07
to
Steve Easton wrote:
> Karl,
> This page is at least 5 years old, and was created using IE 5.5 on a windows 95B
> machine. Maybe even IE 5.0
> http://www.95isalive.com/explorer/szonesimage.htm

D'oh! Read too fast. Tried the one in the upper-right, not lower-right.

Karl E. Peterson

unread,
Nov 29, 2007, 9:27:33 PM11/29/07
to

Didn't even know it was there! Honest... <g>

mayayana

unread,
Nov 29, 2007, 11:14:12 PM11/29/07
to
> > The original
> > extension I made was fairly simple. It just called
> > an applet for security configuration when the
> > menubar button was clicked. (The idea was to
> > provide one of the most sorely needed features
> > (even to this day) for IE: The ability to quickly toggle
> > between customized security levels from the
> > browser window without needing to go through
> > the whole Internet Options mess.)
>
> Ok, maybe I'm dreaming, but IIRC as far back as IE 5 or 5.5 all
> you have to do is double click the globe where it says Internet
> in the right side of the status bar and the security dialog opens.
>

That's interesting... and very unintuitive. On mine
it's My Computer in the lower right, but it does open
the Security tab if I double click it! That wasn't really
what I meant, though. It saves a couple of steps,
clicking menus, but the Security/Advanced/Privacy
tabs themselves are a hopeless mess that the average
person can't hope to understand. And even for someone
who does understand it, the medium level security is
grossly unsafe, while high level blocks downloads, yet
is not terribly safe.

What I had devised as an alternative was a function
that first redefined high level (by rewriting the respective
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\
CurrentVersion\Internet Settings\TemplatePolicies\Medium
Registry key) such that the security actually was high - with
all script, ActiveX, Java, etc. completely disabled - while
allowing file downloads. Then I made the browser extension
with a small window that provided the option to toggle between
the two levels with just the click of a button. It was a
customization that I titled "Close the barn door". :)

The whole thing works well in IE4/5. Once the
extension is installed there's a little yellow and black
Stanley screwdriver icon on the menu bar and clicking that
opens the extension's window. But in IE6 the ability to
force IE to recognize the changes immediately doesn't
work anymore. And if the settings can't be updated immediately
then it doesn't work as a quick-toggle tool.

In any case, with the other options now available I
wouldn't dream of using IE online, and I no longer consider
IE to be reasonably fixable for any use other than HTAs and
testing webpage code.


0 new messages