Qingbo

Hi,

I want to make my toolbar visible after the installation(registration) process complete (after restarting IE, of course), but I don't know what is controlling a toolbar's visibility.

Is it controlled by a registry key, or other things

Thanks for your help.




Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

HadaytUllah

hi,

it depends on the way you used to create your tool bar , to show your tool bar after installation you should create BHO which is immediately loaded as it is installed, from which you can show your tool bar using IWEBBROWSER2.SHowToolbar method.

i hope this will help you.






Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

Qingbo

Thank you for your reply, HadaytUllah.
My toolbar is a dll written with ATL/COM (a deskband). I used visual studio to create the MSI installer.
How to make the toolbar visible after the installation completes

Thanks





Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

HadaytUllah

Hi,

I dont understand one thing, you said its a toolbar then why you created a deskband. For tool bar in internet explorer microsoft provided method of TOOLBAND and BHO, you should first read about these or furthur clarify what you have created a toolbar or a beskband object.






Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

Qingbo

Hi,

I'm sorry to make the mistake. It is a toolband:)

I think I can't control the visibility in the toolband source code, because it's called when IE loads the toolband (the user right clicks on the IE toolbar field and choose my toolband menu item, for example). It's not always called when IE starts up.

Is there anything that can be done by the installer program For example, setting some registry key

Thank you.





Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

HadaytUllah

hi,

I don't think so that it is posssible to show toolbar by installer if it is created using Toolband. You should use BHO , and believe it you will not need to make any major changes to your toolband project, with minor changes it will become a BHO.

Just try it.






Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

Appxweb

Have a look at http://www.codeproject.com/shell/2find.asp which provides one solution to your problem. From the atricle:

...............

2Find Toolbar for IE - Yet Another Sample
Author :Mike Melnikov


Here is main code to open a new web browser to display and enable the
toolbar.

IWebBrowser2 *pIE;
HRESULT hr = CoCreateInstance(CLSID_InternetExplorer, NULL,
CLSCTX_LOCAL_SERVER,
IID_IWebBrowser2,(void**)&pIE);
pIE->put_Visible(VARIANT_TRUE);

VARIANT vtBandGUID;
VARIANT vtShow;
VARIANT vtNotUsed;
vtBandGUID.vt = VT_BSTR;
vtBandGUID.bstrVal = SysAllocString( pszBarCLSID );
vtShow.vt = VT_BOOL;
vtShow.boolVal = bShow;
vtNotUsed.vt = VT_INT;
vtNotUsed.intVal = 1;
HRESULT hr = pIE->ShowBrowserBar(&vtBandGUID, &vtShow,
&vtNotUsed);
SysFreeString(vtBandGUID.bstrVal);

Hope this helps

Regards

Ian






Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

Qingbo

Thank you Appxweb. This should be a solution. I'll try it.




Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

Wizpatent

Hi,

Can you tell me how to declare "CLSID_InternetExplorer",
"CLSCTX_LOCAL_SERVER", and "IID_IWebBrowser2" that are used in "CoCreateInstance()". Thanks a lot.

Terry.




Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

Qingbo

Create an ATL/COM project and the headers where they're defined are automatically included.
You can search msdn.microsoft.com with Google and see the details.





Re: Internet Explorer Extension Development How to make a toolbar visible by programming?

Reza Nourai - MSFT

In case you are writing a non-ATL application, you can include <exdisp.h> to get those definitions manually.

-Reza