Menu Locking bug: WebBrowser and ToolBars... 
Author Message
 Menu Locking bug: WebBrowser and ToolBars...

Ok, Sheridan tech support came through and found a work around...

Apparently, something happens in the process of Loading the WebBrowser which hoses windows
messaging hooks.  Both DataDynamics Active Bar and Sheridan ActiveToolBar rely on Mouse
Event hooks to trap their messages.  As an experiment, I tried using Desaware's SpyWorks
WinHook, and found that when I set it to WH_Mouse, it stopped getting messages as well, (the
problem was solved with the WinHook if I set the hook type to WH_GETMESSAGE instead).

As a work around for the two toolbars in question, you need to reset their hooks after the
browser load to make them function again...

With Sheridan ActiveToolBar use the following code snippet:

    MySheridanToolBar.Enabled = False
    MySheridanToolBar.Enabled = True

With DataDynamics Active Bar use this code:


Hope this helps anyone else out there.  Anybody out there in MS land know why this Hook
hosing occurs?


> Bug Description -

> Products concerned: WebBrowser Control, DataDynamics ActiveBar, or
> Sheridan ActiveToolBar

> Behavior: The a MenuBar stops responding to mouse-clicks after a
> WebBrowser has been loaded into a control array WITHIN a UserDocument.

> This bug occurs when the attached project is compiled and run as an
> executable (bug doesn't show up in VB de{*filter*}):

>     - This very simple VB 5 project begins with the Microsoft WebBrowser

> Control from shdocvw.dll (Microsoft Internet Controls), and places it
> within a UserControl.
>     - This WebBrowser is made the first element of a control array by
> setting its index to 0.
>     - We add a button to the UserControl to Load a new WebBrowser into
> the control array at will.
>     - We add the completed UserControl to our main form along with an
> ActiveToolBar Menu.
>     - We compile the program and run its executable.

>     - On startup the MenuBar appears to be working correctly.
>     - After clicking the button to load a new WebBrowser into the
> control array, however, the MenuBar dies.  It also now seems to behave
> like the windows title bar, (right clicks on it will bring up the
> contextual menu usually associated with a title bar).

> This is either a problem with the Microsoft WebBrowser or the
> ActiveBar, possibly only in demo mode, (or both ;-).
> I have experienced a similar problem with Sheridan's ActiveToolBar
> control, (it does about the same thing as the Data Dynamics one).  Is
> there
> something fundamentally wrong here?

> I currently have email out to both Data Dynamics and Sheridan
> tech-support.  Will repost the
> reply if they get back to me.

>   ------------------------------------------------------------------------

>                            Name:
>       Type: WinZip File (application/x-unknown-content-type-WinZip)
>                        Encoding: base64

Fri, 26 Jan 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Menu Locking bug: WebBrowser and ToolBars...

2. BUG: Toolbar-Buttons wrong pictures - (1/1)

3. BUG: Toolbar-Buttons wrong pictures - (0/1)

4. BUG: Toolbar-Buttons 32*32 wrong pricture - (0/1)

5. BUG: Toolbar-Buttons 32*32 wrong pricture - (1/1)

6. BUG: Workaround for cool menu accelerator bug?

7. Synchronise menus, toolbars, context menus etc.

8. vb5 Customize Toolbars/menus -- can you define sub-menus

9. Locking Toolbars

10. Toolbar locks after loading MDI child form

11. Locking the toolbars...

12. Displaying Toolbars and Statusbar in WebBrowser-Control


Powered by phpBB® Forum Software