Mozilla based web browser control for VB6 - vb6

In my VB6 application I am using web-browser control(Microsoft internet control). I want to use Mozilla based web browser control instead of Microsoft internet control. I found several links about gecko control.It also had many references in Mozilla website and developed by Mozilla. But is it only available for .net , not for vb6? Then I found Mozilla ActiveX Control. It seems to work, but I want to know is it same as gecko and can be used in my application? Is there any disadvantage in using it?

I think the best you could hope for is that Mozilla has an API you can access from VB6.
That'll be a lot harder to use if you want to embed a browser in your app.

Related

Is there an equivalent of chrome's nativeMessaging API in Internet Explorer?

On chrome, extensions can exchange messages with native applications with the help of native messaging APIs How can we achieve this on IE?
use-case : We have our own desktop application which users can download and install from our site. Next time when they revisit, we should be able to detect if the native application is installed and launch if its available.
We were able to build a solution on chrome with the help of an extension which makes use of chrome native messaging APIs to connect to native application.
Need something similar on IE browsers or a generic solution which will work across all major browsers.
You might want to have a look at URL handlers, they are supported for Firefox, Chrome and Internet Explorer.
Basically it enables you to register for example myapp:// for the browser and then you can have the browser call the application that is registered to this handler.
This is a technique which for example uTorrent uses to open trackers for torrent:// and magnet://.
You can check these links for details or search for solutions here on SO:
https://developer.mozilla.org/en/docs/Web-based_protocol_handlers
https://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx
https://developer.chrome.com/apps/manifest/url_handlers
If you have the desktop application installed, you can just install the BHO in the IE. This BHO should handle Navigate events from the browser, then, when user navigates to your site, BHO will indicate to the site, that the your app is present on the system. For example, BHO can inject some "marker" node on the page or call some predefined JS function on the your site's page. Also this BHO can perform some additional communication with you desktop app via the COM (or you can emulate manually int the BHO the protocol used in Chrome native messaging) and use the same approach as for Chrome.

Firefox extension app hosted on server

I managed to create a Chrome extension pretty easy and the main application is hosted on my server allowing me to provide updates to the app itself without having to update the whole extension. I like the idea and I just want to know if it's possible to create a similar extension for Firefox where the main application is hosted on a live server.
In creating my Chrome extension, I followed a tutorial. The code for Chrome is included on the linked page.
It's possible to create a simple extension that loads a web app either in a panel or a tab. You should read up on the Addon SDK documentation, including the panel, tabs and getting started docs.
There is nothing wrong with this, as the web app would not have direct access to internal Firefox APIs. If you read the Addon guidelines closely that #makyen links to above, none of it covers this implementation detail. In their defence, they seem to have misinterpreted what you want to do. It looks to me like you just want to integrate / launch your web app from the browser UI?
Web application:
After finding the tutorial (please provide a link next time) I surmise you are referring to in your question, I suspect that what you are actually attempting to convey is different than how I initially interpreted your question. I have edited the question to make this more clear to people reading it in the future.
That tutorial is explaining how to place a link to a web application into the Chrome user interface. Such is, to a large extent, just a bookmark that is able to be placed within other areas of the user interface than the bookmarks bar.
If that is what you are wanting to do, then, yes, you can easily do so in Firefox. Given that the extension is not running external content in the security context of an extension (you are effectively just navigating to and displaying a website), then that should be fine as a Firefox extension. Note that you need to be sure that you are not granting elevated permissions when you launch the web application.
If running a web application is what you are wanting to do, then I suggest you might want to use different semantics to refer to what you are doing. The above is not a "Firefox extension app hosted on server". Saying it that way strongly implies that you are hosting the actual extension code on your own server. The rest of your question implies that the extension dynamically loads external code and runs it. I would suggest that you refer to it as something like: a web application that is launched (navigated to) by a Firefox extension allowing the web application to be started from an icon in the toolbar.
Extension running web sourced code:
However, if what you are wanting to do is have external content running as a Firefox extension, then implementing that functionality is a large security hole for anyone installing the extension. Even assuming that your intentions are totally benign, there is a huge security hole for anyone who is intercepting your traffic, or gains control of your server to inject code into Firefox that runs at the level of an extension (i.e. the malware can have full control of the browser and then of the computer).
Yes, it is currently possible for you to write this for Firefox.
However, given that the extension pulls code from something not packaged within the extension, the extension will never be permitted to be hosted on AMO.
In addition, the plan is that later this year there will be mandatory signing of Firefox extensions through Mozilla. I doubt that an extension like this will be permitted at that time.
You can read a set of Add-on guidelines on MDN.

Is TWebBrowser dependant on IE version?

I am thinking about using the TWebBrowser component that comes within Delphi's default pallet of components in a project, but I wonder if it uses the IE version installed on the client machine?
If yes:
then I guess it would share its history, cookies, workoffline and stuff like that?
Can I separate them somehow?
Is there any webbrowser component that is free and is not shared with Internet Explorer on the client?
The current answer is not quite correct. It appears for compatibility purposes, the WebBrowser control will run in IE7 Standards Mode by default unless you add some registry settings.
See:
WebBrowser Control Rendering Modes in IE8 (archive)
More IE8 Extensibility Improvements (archive)
So it's not quite the current IE version. You can also check this if you use fiddler or check the web server logs for the agent string - as it alters the agent string used too!
Yes, TWebBrowser uses whatever IE version is installed on the machine.
Take a look at this similar thread for some possible alternatives..
How to embed a browser object, other than IE<n>, in a Delphi application
Yes, TWebBrowser is tied to Internet Explorer. If you want a standalone HTML viewer, then look at the PBear components.
TWebBrowser is a wrapper around IE ActiveX interface.
So, in the end,
TWebBrowser = Internet Explorer

Debugging web app on the palm pre?

I have a web app that works fine on desktop browsers, but struggles on the palm pre browser (via the emulator). How do I debug the app on the palm pre browser? There doesn't seem to be any error console, dom inspector, etc... I'd expect such tools from a web-app oriented phone.
The debugging tools on the webOS platform are generally still poor, and thats speaking for the application development.
I dont think there is any debugger for the web browser. You're stuck with document.write and related.
And for applications themselves, its better, but not by much. There is a command line debugger that you can use to set break points and inspect. There is also an inspector based on Safari that you can use to inspect the dom and such. And there is basic info/warn/error debugging to syslog. But these are for applications using the Mojo framework, and not exposed to web pages.
That said, the browser is based on Webkit, so its fairly close to Safari 4. There are some good sized chunks missing in Canvas and advanced CSS support. Browsing the developer forums will help see what CSS and Canvas features are missing or broken.

How to Enable ActiveX in Chrome?

I read that early builds of Chrome supported ActiveX, but was later restricted to certain MIME types (for support for say Windows Media Player). I then read Google was going to enable ActiveX strictly for the Korean market. How do I (re)enable this in Chrome?
Our web based product relies on ActiveX controls from 3rd parties to play custom video. This limits us to IE. We'd love to support Chrome also, but find it impossible w/o ActiveX support.
There is a proprietary plugin called "Neptune" which says that it will allow you to use IE Tab functionality in Chrome on Windows.
Meadroid do this because they have ActiveX controls which they have written and they want them to be able to work in any browser, and they explicitly mention Chrome in the list of supported browsers for enabling ActiveX with this.
There is also a modified version of Chrome, called ChromePlus, which includes IETab, among other extra features.
I've not used either of these personally, but they look like they'll do what you want. I'd be interested to hear if they work out for you, as I know of other people who want to be able to use IEtab in Chrome :)
anyone who says activex is less secure then NPAPI is crazy. They both allow the exact same access. Yes I've written both. The only reason people think activeX is insecure is because 10+ years ago IE had default settings that allowed a remote site to auto download the plugin.
maybe this new Chrome extension helps:
ActiveX for Chrome
https://chrome.google.com/extensions/detail/lgllffgicojgllpmdbemgglaponefajn/
This could be pretty ugly, but doesn't Chrome use the NPAPI for plugins like Safari? In that case, you could write a wrapper plugin with the NPAPI that made the appropriate ActiveX creation and calls to run the plugin. If you do a lot of scripting against those plugins, you might have to be a bit of work to proxy those calls through to the wrapped ActiveX control.
I'm not an expert but it sounds to me that this is something you could only do if you built the browser yourself - ie, not something done in a web page. I'm not sure that the sources for Chrome are publicly available (I think they are though), but the sources are what you'd probably need to change for this.
http://wiki.answers.com/Q/Does_Google_Chrome_support_ActiveX
Google Chrome comes with an ActiveX
shim, as part of its default plugin
array. So Google Chrome features at
least partial support for ActiveX
controls (as do many non-Internet
Explorer browsers). I can't find
information as to whether or not this
includes support for ActiveX security
certificates or the like, nor if/where
such plugins can be controlled, within
the browser.
..... Note that to enable the plug-in
you must run Chrome with the following
switch " --allow-all-activex" So in
shortcut that is used to start up
Chrome, add this after "Chrome.exe"
I downloaded this "IE Tab Multi" from Chrome. It works good! http://iblogbox.com/chrome/ietab/alert.php

Resources