Bind Windows Form to Application Window (Excel)

G

GK

Hey,
I have developed a Com-AddIn for Excel using VS2003 C# without VSTO. I am
using modeless windows forms. This forms must stay in front of Excel, but
must disappear if the user selects another application.
How can I bind Windows Forms to the Excel-Application window (my forms must
be childs to of the Excel Application window).
I have tried some code: App is my Excel.Application.

IntPtr ex = new IntPtr(App.Hwnd);
frm = new Form1();
frm.AddOwnedForm(?????);
frm.show();

Thanks for your help.

Gerlinde
 

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