Otlk 2007 does not block when in "always prompt for..." mode

  • Thread starter Thread starter Chris Miller
  • Start date Start date
C

Chris Miller

Hi, I asked a question last month

http://www.microsoft.com/communitie...&p=1&tid=4f505b6c-1e40-4ea1-aec5-d012d7240107

about how to get Outlook to prompt for a username and password when in
"Always Prompt for a username and password" mode in the security settings
dialog for an exchange account.

The workaround is to get it to force a send and recieve using the
Namespace.SyncObjects[n].Start()

My application is a seperate process and in outlook 2003, the authentication
dialog is presented and it is top-level above my window and it blocks
correctly, however in outlook 2007, the dialog box is displayed but beneath
my application (it can also dissapear after a brief period of time) and it
does not block.

Is there any way to force it to block and display at the top-level, perhaps
I can inform the application object of the windows handle I am using ??

Any further help would be greatly appreciated, Many thanks

Chris
 
That window isn't exposed to the object model, so you'd have to find out the
window caption and class using something like Spy++, and find the window
using a Win32 API call such as FindWindow() or FindWindowEx().

When you find the window you can call to make it the top most window, using
a call to something like SetWindowPos() with the hWndInsertAfter argument
set to HWND_TOPMOST.

That would make that window topmost of all windows on your desktop.
 
OK, Thanks again Ken,

I feared that might be the case and will start looking into finding its
windows handle etc...

Ken Slovak - said:
That window isn't exposed to the object model, so you'd have to find out the
window caption and class using something like Spy++, and find the window
using a Win32 API call such as FindWindow() or FindWindowEx().

When you find the window you can call to make it the top most window, using
a call to something like SetWindowPos() with the hWndInsertAfter argument
set to HWND_TOPMOST.

That would make that window topmost of all windows on your desktop.




Chris Miller said:
Hi, I asked a question last month

http://www.microsoft.com/communitie...&p=1&tid=4f505b6c-1e40-4ea1-aec5-d012d7240107

about how to get Outlook to prompt for a username and password when in
"Always Prompt for a username and password" mode in the security settings
dialog for an exchange account.

The workaround is to get it to force a send and recieve using the
Namespace.SyncObjects[n].Start()

My application is a seperate process and in outlook 2003, the
authentication
dialog is presented and it is top-level above my window and it blocks
correctly, however in outlook 2007, the dialog box is displayed but
beneath
my application (it can also dissapear after a brief period of time) and it
does not block.

Is there any way to force it to block and display at the top-level,
perhaps
I can inform the application object of the windows handle I am using ??

Any further help would be greatly appreciated, Many thanks

Chris
 
Back
Top