Re: Input box pops behind email window
- From: "Dmitry Streblechenko" <dmitry@xxxxxxxxxxx>
- Date: Thu, 2 Feb 2006 10:13:27 -0700
With the Word editor, even SetWindowPos won't help: first, Word inspectors
do not expose the IOleWindow interface that you can use to read the window
handle, so FindWindow() for the appropriate window caption and/or class name
is the only way to retrieve the handle. Secondly, Word inspector lives in
the winword.exe address space rather than outlook.exe, which means you will
have problems with making the inspector window the parent of your window
(which InputBox won't allow you to do, and doing that in VB is close to
impossible since you need to pass the right handle to the CreateWindow()
function). Even after you manage to do that, closing your dialog would bring
the main Outlook window to the foregroundv since the inspector window is in
a different process address space...
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Michael Bauer" <mb@xxxxxxxx> wrote in message
news:3gg6swsfpjkh$.155mcxsn1bjh.dlg@xxxxxxxxxxxxx
Am Wed, 1 Feb 2006 19:46:29 -0800 schrieb John Svercek:
Unfortunately you need to bring your window on top by code with the Win32
API SetWindowPos. That´s easier if you´re using a VB Form instead of the
InputBox, because for the latter it´s a lot of work to get the window
handle.
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
I have created a Outlook Addin that creates buttons in the email window.One
button pops an Input box so the user can enter information. This worksfine
when the Outlook email editor is used but if Wordmail is used the boxup
pops
behind the email window, it seems to be associated with the main outlook
window rather than the email window.
I am using vb6 and Outlook 2003 (I have not tested 2000 or 2002 yet).
For completeness here is the code snippet that pops the box, nothing
mysterious there.
ThisKey = InputBox("Enter the Key from JCS Technologies, Inc." _
& vbCrLf & "If you do not have a key you can obtain one at
www.JCSTechnologies.com." _
& vbCrLf & "--Or--" _
& vbCrLf & "You can select CANCEL to continue in un-registered
mode.", _
"Collaboration Addin for Outlook")
.
- Follow-Ups:
- Re: Input box pops behind email window
- From: Michael Bauer
- Re: Input box pops behind email window
- References:
- Re: Input box pops behind email window
- From: Michael Bauer
- Re: Input box pops behind email window
- Prev by Date: Re: Retrieve members from DistListItem
- Next by Date: Re: Input box pops behind email window
- Previous by thread: Re: Input box pops behind email window
- Next by thread: Re: Input box pops behind email window
- Index(es):
Loading