I have a form which spawns from an excel add-in written with VSTO.
I would like the form to remain always above the excel spreadsheet, but still allow the user to interact with the sheet below it.
The forms constructor includes this.TopLevel = true;, but the form still disappears behind the spreadsheet when I select a cell.
Has anyone else come across this problem and found a workaround?
A form already has TopLevel set to true. You want TopMost.
P/Invoking SetParent() would be best but getting the window handle you need might not be that easy. Maybe Process.GetCurrentProcess().MainWindowHandle