Have c# program open in middle of excel window
Posted on 2011-03-04
I have a c# program that consists of a form and a few controls on it. I have a VBA macro that will open this program using this code
dblShellRetn = Shell("C:\theProgram.exe", vbNormalFocus)
This opens the program however I want it to be centered within the excel application window.
Is there some way with Excel vba to not only open an external application but center it within the excel window? Otherwise how would I program it in c# so that whenever it is opened it finds out the center of the excel application and positions itself to be in the middle of the excel window?