|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
IE Add-ons?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 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 | | 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. -- Show quoteSteve Easton "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 > 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 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. -- Show quoteSteve Easton "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 > Steve Easton wrote:
> A BHO is different than what I'm trying to accomplish. Bookmarked! Good resource.> 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++ 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 I need to create a sidebar, and "do a few things" there.> has closed the instance of IE that it has opened, to prevent the "Object has > disconnected > from server" error. It wouldn't by any chance be one that will highlight and convert to hyperlinks,
any phone numbers in a web page would it? -- Show quoteSteve Easton "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 > Steve Easton wrote:
> It wouldn't by any chance be one that will highlight and convert to hyperlinks, Nope, hadn't run across that one, myself. <G>> any phone numbers in a web page would it? 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 > > mayayana wrote:
> I've written a browser extension. It Ahhh... Any notion what a sidebar requires/uses?> 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 D'oh! Got it on the shelf. Will take a look!> takes some pretty funky code to set up. The > details are provided in Visual Basic Shell > Programming (O'Reilly). Thanks... Karl > I'm guessing that you mean a band object or> Ahhh... Any notion what a sidebar requires/uses? > 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. mayayana wrote:
>> Ahhh... Any notion what a sidebar requires/uses? A docking window, perhaps? I dunno, it's the "thing" that History uses, for > > I'm guessing that you mean a band object or > docking window. I haven't tried those, but they're > in the book. example. > The original Yeah, that is something they never implemented nicely!> 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 Right... I sorta groked that from a few links yesterday, including source to a > 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. typlib called vbbho. Show quote > I haven't looked at my code for some time, and I'm wondering if those CommandTarget "things" are only needed/related to the button? > 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. Will probably need to find something else for this sidebar "thing" I need. (I hate OLE interface detective work!) Thanks... Karl "Karl E. Peterson" <k***@mvps.org> wrote in message This /may/ be worth a download. It's a bit dated (y2k), but... who knows..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! > 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 Ken Halter wrote:
> "Karl E. Peterson" <k***@mvps.org> wrote ... Ah-ha! Yes! That's the critter. So it is a band object I'm needing. Kewl. Now I >> >>> 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 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 |
|||||||||||||||||||||||