Creating options page for BHO - bho

I am creating an IE browser extension using BHO,
I would like to create an option page like the on chrome or firefox.
I want this page to be accessible using manage add-ons page like it works in chrome and firefox. Is it possible? how do I do that?
I am using visual studio ATL and c++

Your Best Best is adding Context Menu or Tools Menu Item.
Basically There is no Standard IE Options Dialog that you can merge your stuff into.
you are gone have to have your own dialog.
as a warning starting with IE10 and IE11. your IE-Addons (BHO,Menu,Toolbar,DeskBank) will not have any access to registry or file system.
if you need to save some stuff. you are gone have to probably create a broker process.
for instance you need to create a windows service that listen on a socket (maybe some random port) and yo you can communicate with it from your options dialog on what to save and what to read.
Inserting context Menus into IE
Inserting Menu Options

Related

How to programmatically open a website and click buttons

How to use VBScript to implement the following:
Open web browser
Load a URL in web browser after opening
List item
Click buttons in the loaded browser
Is this possible using VBScript. Any examples of code to help get me started would be beneficial. Also, my web browser is Chrome.
There is a Selenium webdriver created that works with VB.NET, VBA, and VBScript. Download and install the exe.
There are also lots of example scripts that show loading different browser types or in your case Chrome. Once loaded you just need to program what elements to navigate and click after loading your specific URL.
There might be other ways to launch and run commands against the web browser using VBScript. This is just one way.
SeleniumBasic v2.0.9.0 created by Florent Breheret and open source via git hub.
A Selenium based browser automation framework for VB.Net, Visual Basic Applications and VBScript
Script Example:
Set driver = CreateObject("Selenium.ChromeDriver")
driver.Start
WScript.Echo "Click OK to quit"
driver.Quit
Here is the official SELENIUM page: selenium main page
UPDATE:
Here is a second option that is based on the same concept , but implemented a little different. I am not sure it meets your needs , but thought I would include it as another example.
VBS WebDriver
Examples using the VBS WebDriver which is intended to provide a simple binding for Selenium 2. The bindings include the full functionality of Selenium 2 (WebDriver).
If you press F12 in Internet Explorer you can lie about what browser you are using. Use the compatibility tab (a downward direction play icon) and enter your UA string for a browser they support.
See https://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx

Security settings in IE that cause not loading all page components

The situation is this: site was added as trusted in IE, I'm able to open it, but not all components in a webpage are visible. The page contains multiple tabs (that use AJAX), with a tab as default. When trying to access other tabs, they appear empty (tab content doesn't load). So, always only the default tab opens with loaded content, the others don't.
What security settings in IE can cause this?
You have to enable "active scripting" and allow the browser to run safe ActiveX modules in older versions of IE. The usual work-around involves using an iframe for IE since most people will not add the domain to the trusted domain list and deal with all of IE's warnings about security being lowered (or they don't have access to those settings in their workstations because of a group policy set by IT).
After IE 6 they started using the standards approach... check out this reference from Microsoft on the XMLHTTP object.
Also you have to actually be able to call the other windows by name in your instance (since there is no main DOM-accessible listing of available windows and tabs), which means that you would need to have opened them from the initial window so you can setup the Javascript reference as a reusable variable.
var Window1 = window.open();

Modify contents of Firefox download dialog from add-on kit

I'd like to be able to add an option to the download dialog that pops-up in Firefox when starting a file download. Is it possible to do so using the new add-on SDK or do I have to do it the old way?
edit: Obviously, if the new option is selected, I need a way to know it and execute code based on it.
That's something you would use XUL overlays for. I guess that the dialog you are talking about is chrome://mozapps/content/downloads/downloads.xul - the download manager. AFAIK doing this isn't possible with the Add-on SDK, it only provides the most common UI integration points. You could create a traditional extension however, it can overlay any dialog.
There is no existing module that will help you that I know of, so you would have to create one, or wait for one to be made by someone else. But the main idea to extending browser UI is simple, and goes like this:
When the addon is loaded, scan for open windows of the type that you wish to extend.
extend the open windows by adding xul elements and javascript to the page.
listen for newly opened windows, and test that they are the type that you are looking for once they open
extend newly opened windows while your addon is active
Clean up after yourself when windows close or when your addon is disabled/uninstalled.
The last step is the most important and never matter with old school extensions which were not restartless.
Some for the built-in modules that you can look at that do this are the widget module, the context menu module, and the hotkeys module, all of which you can find here.
I've made a couple myself which are the toolbar button module, the xulkeys module, the menuitems module, and a few others, all of which you can find here.
Recently I wrote an extension do the same things. A bootstrap extension, not using addon-sdk.
I already submit it on AMO, but wait for review
https://addons.mozilla.org/en-US/firefox/addon/download-dialog-tweak/
And the source code
https://github.com/muzuiget/download_dialog_tweak

Winform usercontrol in WebForm

I want to display a "folderview" which I can drag and drop files into but via WebForm. I am doing this via a webbrowser control pointing at local drive. The code works in a win form user control but what I want is to embed this control in web form. This is an intranet so security etc is less of an issue. However when I add things like AllowDrop or the webbrowser control to my control it stops working - I get the image placeholder which I take to mean an error. Can anyone give me an idea what is wrong or perhaps suggest a different solution.
Hi I figured it out when you deploy a new version of your user control you need to clear the GAC download cache - gacutil /clc but I think versioning your dll may work. I don't think web browser control work at all but I may be wrong. I've managed to drag and drop msg files with Outlook Automation see http://bytes.com/groups/net-vb/527320-drag-drop-outlook-vb-net-richtextbox

How do I write a custom start page for VS 2008?

I've looked around, and not found much documentation on this, so I thought I'd ask where all the experts hang out.
I would like to create a new start page, with bug tracking and source control interfaces, rather than the standard MSDN feed. I seem to remember that one can do more than just supply a different URL, but can actually implement a component to run as the start page, which needn't use web content. I may be wrong. Can anyone please give me some tips?
You can do is to create a DTE ToolWindow (read: Creating a ToolWindow hosting a .NET user control) and host your controls there, then its pretty easy to create an addin that will show the tool window as a document at runtime. (The same way that the start-up page looks)
Go to Tools > Options > Environment > Startup and put your RSS URL in the Start Page news channel field.
That should give you enough, but if you want to do more you can select open home page in the at startup dropdown and point it at a URL with the appropriate content. If you use an intranet with Windows authentication you could display user specific stuff.
This will be completely customizable in VS 2010. You'll be able to do anything you want to on the start page.

Resources