Open .NET Form within Excel

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

Open .NET Form within Excel
Open Form within excel  
Praveen Kumar




Posts: 23
Joined: 2008-02-02
How to open a .NET form which is always visible within Excel application?

We can do this in VSTO using current excel window handle (Ex: Globals.ThisAddIn.Application.Hwnd), but not sure how I can achieve this using add-in express.
Best Regards,
Praveen
Posted 23 May, 2015 13:40:31 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Praveen,

ExcelApp.Application. This property is part of the Excel object model; it doesn't belong to VSTO or Add-in Express.


Andrei Smolin
Add-in Express Team Leader
Posted 25 May, 2015 02:40:42 Top
Praveen Kumar




Posts: 23
Joined: 2008-02-02
Thank you for the answer.

Can I have a sample code to open a always visible .NET form within Excel?

Thanks
Best Regards,
Praveen
Posted 25 May, 2015 06:54:43 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
No, we don't have such an example.

In fact, I don't think we ever created such a form. Consider using a pane instead.


Andrei Smolin
Add-in Express Team Leader
Posted 25 May, 2015 07:00:43 Top
Praveen Kumar




Posts: 23
Joined: 2008-02-02
Thank you. I know ADX Panel is proffered but I cannot change this now.

Seems ExcelApp.Application does not have Hwnd property.
Best Regards,
Praveen
Posted 25 May, 2015 07:07:15 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
It is only unavailable in the interop for Excel 2000. Switch to using interops for the Excel versions that you need to support. Or, if you need to support Excel 2000, you can use the approach they describe at https://support.microsoft.com/en-us/kb/258511.


Andrei Smolin
Add-in Express Team Leader
Posted 25 May, 2015 07:25:58 Top