MSPub freezes when I call ShowDialog

P

PJTewkesbury

Hi,

I am writing an AddIn for MS Office Publisher 11 in C# &.NET V1.1

When I try to display any windows forms with the ShowDialog method,
MSPub.exe displayes the form, but then freezes, and when I click anywhere on
the aplication, it justs beeps at me. The only way out is to use Task manager
to kill the mspub.exe process.

The AddIn it's self is just a plain boiler plate app created by the VS2003
Shared-Addin wizard. All I have done is to add a new toolbar with one button.
I then added a OnClick handler for the button to display an about box. The
About box form is just a simple windows form with an OK button on it.

If I use the same type of code for an addin for Word, it works OK.

Can anyone please help

Thanks for your time

Peter Tewkesbury
 
E

Ed Bennett

PJTewkesbury said:
When I try to display any windows forms with the ShowDialog method,
MSPub.exe displayes the form, but then freezes, and when I click
anywhere on the aplication, it justs beeps at me. The only way out is
to use Task manager to kill the mspub.exe process.

ShowDialog shows the form as a modal form, meaning that the form must be
closed before the user can continue using Publisher.

Is the form itself freezing as well?

If not, but you want the user to be able to use Publisher while the form is
open, use the Show method instead.
 
P

PJTewkesbury

The whole of Publisher freezes. You can not close the windows form, or
publisher.

The form must be a modal dialog.

Peter Tewkesbury
 

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