ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Getting Window Owner in .NET (https://www.excelbanter.com/excel-programming/285564-getting-window-owner-net.html)

Backslider

Getting Window Owner in .NET
 
I'm programming Excel in .NET (using VSTO) and I want to pop up a
messagebox or form. How can I pass the Excel window as the owner
window in the first argument to the Show/ShowDialog method? It wants
an IWin32Window. How do I get that for the Excel application?

thanks
Backslider

KM[_2_]

Getting Window Owner in .NET
 
Try using
var = Application.Dialogs(xlDialogOpen).Show
If Not var Then Exit Sub

regards
KM
-----Original Message-----
I'm programming Excel in .NET (using VSTO) and I want to

pop up a
messagebox or form. How can I pass the Excel window as

the owner
window in the first argument to the Show/ShowDialog

method? It wants
an IWin32Window. How do I get that for the Excel

application?

thanks
Backslider
.



All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com