toolstripcontrolhost with webbrowser

Add-in Express™ Support Service
That's what is more important than anything else

toolstripcontrolhost with webbrowser
dropdown shows at screen position 0,0 on first click 
Mark Amans




Posts: 11
Joined: 2011-02-09
I'm trying to add a WebBrowser control to a ToolStripDropDownButton. The code seems to work just fine, however the first time I click on the button, the drop-down shows at position 0,0 on the screen instead of underneath the button. On subsequent clicks the drop-down shows underneath the button. I know this isn't specifically an AIE issue. It seems to be more of a vb issue, but I wanted to ask y'all first. Here is my code:


        Dim browser As New WebBrowser
        browser.Url = New Uri("http://localhost/test.html")
        Dim host As New ToolStripControlHost(browser)
        Dim dropDown As New ToolStripDropDown
        dropDown.Items.Add(host)
        Me.ToolStripDropDownButton1.DropDown = dropDown
Posted 10 Apr, 2012 09:58:40 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Mark,

Do you develop a standalone application or IE add-on?

Are you able to reproduce the issue with a newly created add-on project? If so, could you please send it to the support e-mail address for testing? Please see the readme.txt file for the support e-mail address.

BTW What Internet Explorer and OS version do you have installed on the PC?
.NET, Extended MAPI, Windows Phone & RT
Posted 10 Apr, 2012 10:29:40 Top
Mark Amans




Posts: 11
Joined: 2011-02-09
Hi Eugene,

I'm trying to develop an IE add-on, however I can reproduce the problem using a standalone form application.

I'm using 64 bit IE 9 on Windows 7.

I'll send the project to the support email shortly.
Posted 10 Apr, 2012 12:02:34 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Mark,

Thank you for providing me with a sample project. I have reproduced the issue on my machine with IE 9 and Windows 7 x64.

Well, it looks like the issue doesn't come from the Add-in Express code (is related to windows forms controls). Please consider using another controls for the toolbar. Also I have found a similar forum thread.
.NET, Extended MAPI, Windows Phone & RT
Posted 11 Apr, 2012 05:48:51 Top
Mark Amans




Posts: 11
Joined: 2011-02-09
Yeah, that was me on that forum :)

The work-around that I posted in there seems to work, so that's what I'm going with.
Posted 08 May, 2012 12:27:06 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Mark,

Thank you for keeping us informed and good luck with your add-in project!
.NET, Extended MAPI, Windows Phone & RT
Posted 10 May, 2012 08:34:38 Top