Dialog in DLL appears behind Word

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

Dialog in DLL appears behind Word
 
Roger Middlebrook


Guest


I have a VCL form (MyDialog) in a DLL. The code in the DLL is relatively complex so moving the form into my add-in is a very difficult option.

I have an ADX Add-In (MyAddIn) that operates with Word 2007, 2010, 2013.

MyAddIn handles toolbar, ribbon and keys in order to handle printing and when activated, calls the DLL to display (modal) its own print form (MyDialog).

We have a new customer (Word 2007) and have found that, quite often, MyDialog appears behind Word. The problem is intermittent and we cannot reproduce it on our own test systems.

Can you recommend a way that we should use to ensure that MyDialog comes to the front? I have seen many many posts on the web about setting parent window handle and other techniques but it would be really good to have your opinion on best practice for this please.
Posted 13 Apr, 2015 04:06:29 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Hello Roger,

This occurs if the Word window isn't initialized/painted/resized yet. We'd recommend using a timer.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Apr, 2015 05:35:36 Top