Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / January 2005

Tip: Looking for answers? Try searching our database.

ShowBrowserBar failing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dean Hallman - 15 Jan 2005 10:12 GMT
I'm calling ShowBrowserBar to programmatically show or hide my own IE
InfoBand (IE side panel).   In my app, the BHO and IE InfoBand are separate
COM objects in a single DLL. This function fails if this particular IE side
panel hasn't previously been displayed manually (by going to
View->ExplorerBar).  Works fine if I manually view the browser bar first,
then close it and then call ShowBrowserBar.

It seems ShowBrowserBar is being called before the explorer bar has been
created.   But, I'm not calling ShowBrowserBar before IE has had a chance to
initialize.  By the time ShowBrowserBar is called, IE has been open and
several pages visited.

How can I programmatically force the creation of the explorer bar so that
ShowBrowserBar doesn't fail if the bar has never been displayed?

Here's my code for calling ShowBrowserBar:

Thanks!
string clsid = "{8AD54A97-E2F0-41b9-A47B-9E871382C346}";

object clsObj = (object)clsid;

object ShoObj = (object)bShow;

int arg = 0;

object argObj = (object)arg;

webBrowser.ShowBrowserBar( ref clsObj, ref ShoObj, ref argObj );
Igor Tandetnik - 17 Jan 2005 15:14 GMT
> I'm calling ShowBrowserBar to programmatically show or hide my own IE
> InfoBand (IE side panel).   In my app, the BHO and IE InfoBand are
> separate COM objects in a single DLL. This function fails if this
> particular IE side panel hasn't previously been displayed manually
> (by going to View->ExplorerBar).  Works fine if I manually view the
> browser bar first, then close it and then call ShowBrowserBar.

Call ShowBrowserBar twice in a row - once to hide and again to show.
Under certain circumstances, IE gets confused as to whether the band is
already displayed or not. Calling ShowBrowserBar twice clears this
confusion.
Signature

With best wishes,
   Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.