Home All Groups Group Topic Archive Search About
Author
28 Nov 2007 5:41 PM
Karl E. Peterson
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

Author
28 Nov 2007 6:16 PM
Kevin Provance
I believe Steve Easton has done one.  Hopefully he'll check in and confirm
this.

- Kev

Show quote
"Karl E. Peterson" <k***@mvps.org> wrote in message
news:u8DsrXeMIHA.2000@TK2MSFTNGP05.phx.gbl...
| 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
|
|
Author
28 Nov 2007 9:24 PM
Steve Easton
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



Show quote
"Karl E. Peterson" <k***@mvps.org> wrote in message news:u8DsrXeMIHA.2000@TK2MSFTNGP05.phx.gbl...
> 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
>
Author
28 Nov 2007 9:32 PM
Karl E. Peterson
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?)

Thanks...   Karl
--
..NET: It's About Trust!
http://vfred.mvps.org
Author
28 Nov 2007 9:45 PM
Steve Easton
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




Show quote
"Karl E. Peterson" <k***@mvps.org> wrote in message news:uOr7uYgMIHA.4228@TK2MSFTNGP02.phx.gbl...
> 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?)
>
> Thanks...   Karl
> --
> .NET: It's About Trust!
> http://vfred.mvps.org
>
Author
28 Nov 2007 10:31 PM
Karl E. Peterson
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.
--
..NET: It's About Trust!
http://vfred.mvps.org
Author
28 Nov 2007 9:49 PM
Steve Easton
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


Show quote
"Karl E. Peterson" <k***@mvps.org> wrote in message news:u8DsrXeMIHA.2000@TK2MSFTNGP05.phx.gbl...
> 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
>
Author
28 Nov 2007 10:22 PM
Karl E. Peterson
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>
--
..NET: It's About Trust!
http://vfred.mvps.org
Author
28 Nov 2007 11:06 PM
mayayana
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).

Show quote
> 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
>
>
Author
28 Nov 2007 11:13 PM
Karl E. Peterson
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!

Thanks...   Karl
--
..NET: It's About Trust!
http://vfred.mvps.org
Author
29 Nov 2007 2:00 AM
mayayana
>
> 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.
Author
29 Nov 2007 7:19 PM
Karl E. Peterson
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.

Show quote
>  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!)

Thanks...   Karl
--
..NET: It's About Trust!
http://vfred.mvps.org
Author
29 Nov 2007 3:27 AM
Ken Halter
"Karl E. Peterson" <k***@mvps.org> wrote in message
news:OEH6PRhMIHA.4752@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
Author
29 Nov 2007 7:21 PM
Karl E. Peterson
Ken Halter wrote:
> "Karl E. Peterson" <k***@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>

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

AddThis Social Bookmark Button