AddIn form doesn't have focus initially

D

Dave Mc

Hi,

I've created an AddIn using VB.NET and have it installed in OneNote. It
works well, except for one minor problem. The AddIn opens up a windows form
on the OnClick event (I used the interface and format given by Daniel Escapa
in 'How to Create a OneNote Toolbar AddIn'). This works as expected and
consistently every time that the button is clicked, except for one. That is
the first time the button is clicked after OneNote has been opened.

In this condition, the form opens, but without focus, so the user has to
click on the icon in the TaskBar to give it focus and so show the form.
Thereafter, it works as expected ie the form opens on top when the button is
clicked. This situation appears to occur each time OneNote is invoked, not
just the first time after installation of the AddIn.

I get exactly the same performance when calling just a MessageBox, as given
in Daniel Escapa's article, rather than the form I've created.

It would be really nice if it didn't do this, as I would rather that the
AddIn form wasn't shown in the Taskbar. Have I missed a parameter value to
set?

TIA

DaveMc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top