C
Chris Bardon
I have an office COM add-in that I designed for 2003 that creates
controls which in turn create windows forms. I had a problem in 2003
where clicking a button would create the appropriate form, but the
form would be created behind the Outlook main window (i.e. in the
background). I managed to solve this by using the Win32
SetForegroundWindow method in the form's OnLoad, and this solved the
problem for Office 2003. In 2007 though, the problem has resurfaced,
and the SetForegroundWindow command doesn't seem to be working. Is
there something that has changed in 2007 that could be causing this
behaviour? I've installed the latest VSTO on my build machine, and
the 2007 PIAs on the target, but still no luck.
Any ideas?
Thanks,
Chris
controls which in turn create windows forms. I had a problem in 2003
where clicking a button would create the appropriate form, but the
form would be created behind the Outlook main window (i.e. in the
background). I managed to solve this by using the Win32
SetForegroundWindow method in the form's OnLoad, and this solved the
problem for Office 2003. In 2007 though, the problem has resurfaced,
and the SetForegroundWindow command doesn't seem to be working. Is
there something that has changed in 2007 that could be causing this
behaviour? I've installed the latest VSTO on my build machine, and
the 2007 PIAs on the target, but still no luck.
Any ideas?
Thanks,
Chris