You are here: Office-Outlook.com  / Outlook Forum

questions about windows relationship and always on top.

Home » Outlook addins and plugins development » Outlook forms
questions about windows relationship and always on top. [message #452372] Tue, 16 December 2008 19:14 Go to next message
BatKing
Messages: 168
Registered: October 2008
Senior Member
Hi,

I created a preference window for my outlook add-in with windows forms. I
have 2 questions.

1. should the preference window be the child window of outlook main window?
if Yes how to make it move outside the outlook window? If I set the parent
window as outlook window, then my window cannot move outside and my window is
kind of flicking and got overlapped by outlook windows (just partially. it
seems outlook is try to draw over my preference window). However if I use
Spy++ and look at the option window of outlook, it is a child window of
outlook and can still move outside. (I am a noob here. but the tree structure
in spy++ is different for this kind of child window. it is not a sub tree
item under outlook window. However in the property's windows tab, it shows
outlook as the parent window).

2. How can I make my preference window always on top of the outlook window
so that if it is not closed, user cannot focus back to outlook. this is just
like the option window in outlook.


Thanks.
Re: questions about windows relationship and always on top. [message #452654] Wed, 17 December 2008 11:45 Go to previous messageGo to next message
BatKing
Messages: 168
Registered: October 2008
Senior Member
Outlook 2003 and 2007. VS 2008 with C# and Shared Add-in is what I am doing.

What I try to do is at some point the my code will create a preference
window. So I created a Form window with some controls on it. this part is
straight forward. but I want the window act like application's preference
window. (for example, outloook's option window).

thanks.


"Ken Slovak - [MVP - Outlook]" wrote:

> What version of Outlook, what development platform and language, what code
> are you using to do what you're doing?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> > Hi,
> >
> > I created a preference window for my outlook add-in with windows forms. I
> > have 2 questions.
> >
> > 1. should the preference window be the child window of outlook main
> > window?
> > if Yes how to make it move outside the outlook window? If I set the parent
> > window as outlook window, then my window cannot move outside and my window
> > is
> > kind of flicking and got overlapped by outlook windows (just partially. it
> > seems outlook is try to draw over my preference window). However if I use
> > Spy++ and look at the option window of outlook, it is a child window of
> > outlook and can still move outside. (I am a noob here. but the tree
> > structure
> > in spy++ is different for this kind of child window. it is not a sub tree
> > item under outlook window. However in the property's windows tab, it shows
> > outlook as the parent window).
> >
> > 2. How can I make my preference window always on top of the outlook window
> > so that if it is not closed, user cannot focus back to outlook. this is
> > just
> > like the option window in outlook.
> >
> >
> > Thanks.
>
>
Re: questions about windows relationship and always on top. [message #452993] Thu, 18 December 2008 07:06 Go to previous messageGo to next message
kenslovak
Messages: 13351
Registered: May 2006
Senior Member
I still have no idea how you were setting the parent/child relationship.

Is your window appearing behind the main Outlook window (Explorer)?

When I open a Windows form in an addin, let's say from a button on a
toolbar, the window appears in front of the main Outlook window and since
it's modal I can't click on the main Outlook window due to the modality.
What are you seeing that's different?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"BatKing" <BatKing@discussions.microsoft.com> wrote in message
news:29F23244-FE79-415B-9ADD-386738E3C745@microsoft.com...
>I figure out how to make my window as a Modal Dialog. using showDialog() is
> the way to go.
>
> so my only question is, should I still set outlook main window as the
> parent
> window? or just leave it as is now which desktop window is the parent
> window.
>
> thanks.
Re: questions about windows relationship and always on top. [message #453120] Thu, 18 December 2008 12:36 Go to previous message
BatKing
Messages: 168
Registered: October 2008
Senior Member
Sorry Ken,

I was confused by myself and that's why I asked this funny yet stupid
questions. Because I started to learn C# (and even all the windows
programming) just 2 months ago and the worst part is I have to add button in
the preview pan which outlook object model not supported. so for all my
windows, forms ...... I used win32 API to add the windows and forms on
outlook. Anyway, I knew how to add a button in preview pan but I didn't know
the basic stuff as how to create a modal dialog. :)

"Ken Slovak - [MVP - Outlook]" wrote:

> I still have no idea how you were setting the parent/child relationship.
>
> Is your window appearing behind the main Outlook window (Explorer)?
>
> When I open a Windows form in an addin, let's say from a button on a
> toolbar, the window appears in front of the main Outlook window and since
> it's modal I can't click on the main Outlook window due to the modality.
> What are you seeing that's different?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> news:29F23244-FE79-415B-9ADD-386738E3C745@microsoft.com...
> >I figure out how to make my window as a Modal Dialog. using showDialog() is
> > the way to go.
> >
> > so my only question is, should I still set outlook main window as the
> > parent
> > window? or just leave it as is now which desktop window is the parent
> > window.
> >
> > thanks.
>
>
Re: questions about windows relationship and always on top. [message #458260] Wed, 17 December 2008 06:27 Go to previous message
kenslovak
Messages: 13351
Registered: May 2006
Senior Member
What version of Outlook, what development platform and language, what code
are you using to do what you're doing?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"BatKing" <BatKing@discussions.microsoft.com> wrote in message
news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> Hi,
>
> I created a preference window for my outlook add-in with windows forms. I
> have 2 questions.
>
> 1. should the preference window be the child window of outlook main
> window?
> if Yes how to make it move outside the outlook window? If I set the parent
> window as outlook window, then my window cannot move outside and my window
> is
> kind of flicking and got overlapped by outlook windows (just partially. it
> seems outlook is try to draw over my preference window). However if I use
> Spy++ and look at the option window of outlook, it is a child window of
> outlook and can still move outside. (I am a noob here. but the tree
> structure
> in spy++ is different for this kind of child window. it is not a sub tree
> item under outlook window. However in the property's windows tab, it shows
> outlook as the parent window).
>
> 2. How can I make my preference window always on top of the outlook window
> so that if it is not closed, user cannot focus back to outlook. this is
> just
> like the option window in outlook.
>
>
> Thanks.
Re: questions about windows relationship and always on top. [message #458261] Wed, 17 December 2008 11:45 Go to previous message
BatKing
Messages: 168
Registered: October 2008
Senior Member
Outlook 2003 and 2007. VS 2008 with C# and Shared Add-in is what I am doing.

What I try to do is at some point the my code will create a preference
window. So I created a Form window with some controls on it. this part is
straight forward. but I want the window act like application's preference
window. (for example, outloook's option window).

thanks.


"Ken Slovak - [MVP - Outlook]" wrote:

> What version of Outlook, what development platform and language, what code
> are you using to do what you're doing?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> > Hi,
> >
> > I created a preference window for my outlook add-in with windows forms. I
> > have 2 questions.
> >
> > 1. should the preference window be the child window of outlook main
> > window?
> > if Yes how to make it move outside the outlook window? If I set the parent
> > window as outlook window, then my window cannot move outside and my window
> > is
> > kind of flicking and got overlapped by outlook windows (just partially. it
> > seems outlook is try to draw over my preference window). However if I use
> > Spy++ and look at the option window of outlook, it is a child window of
> > outlook and can still move outside. (I am a noob here. but the tree
> > structure
> > in spy++ is different for this kind of child window. it is not a sub tree
> > item under outlook window. However in the property's windows tab, it shows
> > outlook as the parent window).
> >
> > 2. How can I make my preference window always on top of the outlook window
> > so that if it is not closed, user cannot focus back to outlook. this is
> > just
> > like the option window in outlook.
> >
> >
> > Thanks.
>
>
Re: questions about windows relationship and always on top. [message #458262] Wed, 17 December 2008 18:15 Go to previous message
BatKing
Messages: 168
Registered: October 2008
Senior Member
I figure out how to make my window as a Modal Dialog. using showDialog() is
the way to go.

so my only question is, should I still set outlook main window as the parent
window? or just leave it as is now which desktop window is the parent window.

thanks.

"BatKing" wrote:

> Outlook 2003 and 2007. VS 2008 with C# and Shared Add-in is what I am doing.
>
> What I try to do is at some point the my code will create a preference
> window. So I created a Form window with some controls on it. this part is
> straight forward. but I want the window act like application's preference
> window. (for example, outloook's option window).
>
> thanks.
>
>
> "Ken Slovak - [MVP - Outlook]" wrote:
>
> > What version of Outlook, what development platform and language, what code
> > are you using to do what you're doing?
> >
> > --
> > Ken Slovak
> > [MVP - Outlook]
> > http://www.slovaktech.com
> > Author: Professional Programming Outlook 2007.
> > Reminder Manager, Extended Reminders, Attachment Options.
> > http://www.slovaktech.com/products.htm
> >
> >
> > "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> > news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> > > Hi,
> > >
> > > I created a preference window for my outlook add-in with windows forms. I
> > > have 2 questions.
> > >
> > > 1. should the preference window be the child window of outlook main
> > > window?
> > > if Yes how to make it move outside the outlook window? If I set the parent
> > > window as outlook window, then my window cannot move outside and my window
> > > is
> > > kind of flicking and got overlapped by outlook windows (just partially. it
> > > seems outlook is try to draw over my preference window). However if I use
> > > Spy++ and look at the option window of outlook, it is a child window of
> > > outlook and can still move outside. (I am a noob here. but the tree
> > > structure
> > > in spy++ is different for this kind of child window. it is not a sub tree
> > > item under outlook window. However in the property's windows tab, it shows
> > > outlook as the parent window).
> > >
> > > 2. How can I make my preference window always on top of the outlook window
> > > so that if it is not closed, user cannot focus back to outlook. this is
> > > just
> > > like the option window in outlook.
> > >
> > >
> > > Thanks.
> >
> >
Re: questions about windows relationship and always on top. [message #458265] Thu, 18 December 2008 07:06 Go to previous message
kenslovak
Messages: 13351
Registered: May 2006
Senior Member
I still have no idea how you were setting the parent/child relationship.

Is your window appearing behind the main Outlook window (Explorer)?

When I open a Windows form in an addin, let's say from a button on a
toolbar, the window appears in front of the main Outlook window and since
it's modal I can't click on the main Outlook window due to the modality.
What are you seeing that's different?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"BatKing" <BatKing@discussions.microsoft.com> wrote in message
news:29F23244-FE79-415B-9ADD-386738E3C745@microsoft.com...
>I figure out how to make my window as a Modal Dialog. using showDialog() is
> the way to go.
>
> so my only question is, should I still set outlook main window as the
> parent
> window? or just leave it as is now which desktop window is the parent
> window.
>
> thanks.
Re: questions about windows relationship and always on top. [message #458274] Thu, 18 December 2008 12:36 Go to previous message
BatKing
Messages: 168
Registered: October 2008
Senior Member
Sorry Ken,

I was confused by myself and that's why I asked this funny yet stupid
questions. Because I started to learn C# (and even all the windows
programming) just 2 months ago and the worst part is I have to add button in
the preview pan which outlook object model not supported. so for all my
windows, forms ...... I used win32 API to add the windows and forms on
outlook. Anyway, I knew how to add a button in preview pan but I didn't know
the basic stuff as how to create a modal dialog. :)

"Ken Slovak - [MVP - Outlook]" wrote:

> I still have no idea how you were setting the parent/child relationship.
>
> Is your window appearing behind the main Outlook window (Explorer)?
>
> When I open a Windows form in an addin, let's say from a button on a
> toolbar, the window appears in front of the main Outlook window and since
> it's modal I can't click on the main Outlook window due to the modality.
> What are you seeing that's different?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> news:29F23244-FE79-415B-9ADD-386738E3C745@microsoft.com...
> >I figure out how to make my window as a Modal Dialog. using showDialog() is
> > the way to go.
> >
> > so my only question is, should I still set outlook main window as the
> > parent
> > window? or just leave it as is now which desktop window is the parent
> > window.
> >
> > thanks.
>
>
Re: questions about windows relationship and always on top. [message #458847] Wed, 17 December 2008 06:27 Go to previous message
kenslovak
Messages: 13351
Registered: May 2006
Senior Member
What version of Outlook, what development platform and language, what code
are you using to do what you're doing?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"BatKing" <BatKing@discussions.microsoft.com> wrote in message
news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> Hi,
>
> I created a preference window for my outlook add-in with windows forms. I
> have 2 questions.
>
> 1. should the preference window be the child window of outlook main
> window?
> if Yes how to make it move outside the outlook window? If I set the parent
> window as outlook window, then my window cannot move outside and my window
> is
> kind of flicking and got overlapped by outlook windows (just partially. it
> seems outlook is try to draw over my preference window). However if I use
> Spy++ and look at the option window of outlook, it is a child window of
> outlook and can still move outside. (I am a noob here. but the tree
> structure
> in spy++ is different for this kind of child window. it is not a sub tree
> item under outlook window. However in the property's windows tab, it shows
> outlook as the parent window).
>
> 2. How can I make my preference window always on top of the outlook window
> so that if it is not closed, user cannot focus back to outlook. this is
> just
> like the option window in outlook.
>
>
> Thanks.
Re: questions about windows relationship and always on top. [message #458848] Wed, 17 December 2008 11:45 Go to previous message
BatKing
Messages: 168
Registered: October 2008
Senior Member
Outlook 2003 and 2007. VS 2008 with C# and Shared Add-in is what I am doing.

What I try to do is at some point the my code will create a preference
window. So I created a Form window with some controls on it. this part is
straight forward. but I want the window act like application's preference
window. (for example, outloook's option window).

thanks.


"Ken Slovak - [MVP - Outlook]" wrote:

> What version of Outlook, what development platform and language, what code
> are you using to do what you're doing?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> > Hi,
> >
> > I created a preference window for my outlook add-in with windows forms. I
> > have 2 questions.
> >
> > 1. should the preference window be the child window of outlook main
> > window?
> > if Yes how to make it move outside the outlook window? If I set the parent
> > window as outlook window, then my window cannot move outside and my window
> > is
> > kind of flicking and got overlapped by outlook windows (just partially. it
> > seems outlook is try to draw over my preference window). However if I use
> > Spy++ and look at the option window of outlook, it is a child window of
> > outlook and can still move outside. (I am a noob here. but the tree
> > structure
> > in spy++ is different for this kind of child window. it is not a sub tree
> > item under outlook window. However in the property's windows tab, it shows
> > outlook as the parent window).
> >
> > 2. How can I make my preference window always on top of the outlook window
> > so that if it is not closed, user cannot focus back to outlook. this is
> > just
> > like the option window in outlook.
> >
> >
> > Thanks.
>
>
Re: questions about windows relationship and always on top. [message #458849] Wed, 17 December 2008 18:15 Go to previous message
BatKing
Messages: 168
Registered: October 2008
Senior Member
I figure out how to make my window as a Modal Dialog. using showDialog() is
the way to go.

so my only question is, should I still set outlook main window as the parent
window? or just leave it as is now which desktop window is the parent window.

thanks.

"BatKing" wrote:

> Outlook 2003 and 2007. VS 2008 with C# and Shared Add-in is what I am doing.
>
> What I try to do is at some point the my code will create a preference
> window. So I created a Form window with some controls on it. this part is
> straight forward. but I want the window act like application's preference
> window. (for example, outloook's option window).
>
> thanks.
>
>
> "Ken Slovak - [MVP - Outlook]" wrote:
>
> > What version of Outlook, what development platform and language, what code
> > are you using to do what you're doing?
> >
> > --
> > Ken Slovak
> > [MVP - Outlook]
> > http://www.slovaktech.com
> > Author: Professional Programming Outlook 2007.
> > Reminder Manager, Extended Reminders, Attachment Options.
> > http://www.slovaktech.com/products.htm
> >
> >
> > "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> > news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> > > Hi,
> > >
> > > I created a preference window for my outlook add-in with windows forms. I
> > > have 2 questions.
> > >
> > > 1. should the preference window be the child window of outlook main
> > > window?
> > > if Yes how to make it move outside the outlook window? If I set the parent
> > > window as outlook window, then my window cannot move outside and my window
> > > is
> > > kind of flicking and got overlapped by outlook windows (just partially. it
> > > seems outlook is try to draw over my preference window). However if I use
> > > Spy++ and look at the option window of outlook, it is a child window of
> > > outlook and can still move outside. (I am a noob here. but the tree
> > > structure
> > > in spy++ is different for this kind of child window. it is not a sub tree
> > > item under outlook window. However in the property's windows tab, it shows
> > > outlook as the parent window).
> > >
> > > 2. How can I make my preference window always on top of the outlook window
> > > so that if it is not closed, user cannot focus back to outlook. this is
> > > just
> > > like the option window in outlook.
> > >
> > >
> > > Thanks.
> >
> >
Re: questions about windows relationship and always on top. [message #458852] Thu, 18 December 2008 07:06 Go to previous message
kenslovak
Messages: 13351
Registered: May 2006
Senior Member
I still have no idea how you were setting the parent/child relationship.

Is your window appearing behind the main Outlook window (Explorer)?

When I open a Windows form in an addin, let's say from a button on a
toolbar, the window appears in front of the main Outlook window and since
it's modal I can't click on the main Outlook window due to the modality.
What are you seeing that's different?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"BatKing" <BatKing@discussions.microsoft.com> wrote in message
news:29F23244-FE79-415B-9ADD-386738E3C745@microsoft.com...
>I figure out how to make my window as a Modal Dialog. using showDialog() is
> the way to go.
>
> so my only question is, should I still set outlook main window as the
> parent
> window? or just leave it as is now which desktop window is the parent
> window.
>
> thanks.
Re: questions about windows relationship and always on top. [message #458861] Thu, 18 December 2008 12:36 Go to previous message
BatKing
Messages: 168
Registered: October 2008
Senior Member
Sorry Ken,

I was confused by myself and that's why I asked this funny yet stupid
questions. Because I started to learn C# (and even all the windows
programming) just 2 months ago and the worst part is I have to add button in
the preview pan which outlook object model not supported. so for all my
windows, forms ...... I used win32 API to add the windows and forms on
outlook. Anyway, I knew how to add a button in preview pan but I didn't know
the basic stuff as how to create a modal dialog. :)

"Ken Slovak - [MVP - Outlook]" wrote:

> I still have no idea how you were setting the parent/child relationship.
>
> Is your window appearing behind the main Outlook window (Explorer)?
>
> When I open a Windows form in an addin, let's say from a button on a
> toolbar, the window appears in front of the main Outlook window and since
> it's modal I can't click on the main Outlook window due to the modality.
> What are you seeing that's different?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> news:29F23244-FE79-415B-9ADD-386738E3C745@microsoft.com...
> >I figure out how to make my window as a Modal Dialog. using showDialog() is
> > the way to go.
> >
> > so my only question is, should I still set outlook main window as the
> > parent
> > window? or just leave it as is now which desktop window is the parent
> > window.
> >
> > thanks.
>
>
Re: questions about windows relationship and always on top. [message #460332] Wed, 17 December 2008 06:27 Go to previous message
kenslovak
Messages: 13351
Registered: May 2006
Senior Member
What version of Outlook, what development platform and language, what code
are you using to do what you're doing?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"BatKing" <BatKing@discussions.microsoft.com> wrote in message
news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> Hi,
>
> I created a preference window for my outlook add-in with windows forms. I
> have 2 questions.
>
> 1. should the preference window be the child window of outlook main
> window?
> if Yes how to make it move outside the outlook window? If I set the parent
> window as outlook window, then my window cannot move outside and my window
> is
> kind of flicking and got overlapped by outlook windows (just partially. it
> seems outlook is try to draw over my preference window). However if I use
> Spy++ and look at the option window of outlook, it is a child window of
> outlook and can still move outside. (I am a noob here. but the tree
> structure
> in spy++ is different for this kind of child window. it is not a sub tree
> item under outlook window. However in the property's windows tab, it shows
> outlook as the parent window).
>
> 2. How can I make my preference window always on top of the outlook window
> so that if it is not closed, user cannot focus back to outlook. this is
> just
> like the option window in outlook.
>
>
> Thanks.
Re: questions about windows relationship and always on top. [message #460333] Wed, 17 December 2008 11:45 Go to previous message
BatKing
Messages: 168
Registered: October 2008
Senior Member
Outlook 2003 and 2007. VS 2008 with C# and Shared Add-in is what I am doing.

What I try to do is at some point the my code will create a preference
window. So I created a Form window with some controls on it. this part is
straight forward. but I want the window act like application's preference
window. (for example, outloook's option window).

thanks.


"Ken Slovak - [MVP - Outlook]" wrote:

> What version of Outlook, what development platform and language, what code
> are you using to do what you're doing?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> > Hi,
> >
> > I created a preference window for my outlook add-in with windows forms. I
> > have 2 questions.
> >
> > 1. should the preference window be the child window of outlook main
> > window?
> > if Yes how to make it move outside the outlook window? If I set the parent
> > window as outlook window, then my window cannot move outside and my window
> > is
> > kind of flicking and got overlapped by outlook windows (just partially. it
> > seems outlook is try to draw over my preference window). However if I use
> > Spy++ and look at the option window of outlook, it is a child window of
> > outlook and can still move outside. (I am a noob here. but the tree
> > structure
> > in spy++ is different for this kind of child window. it is not a sub tree
> > item under outlook window. However in the property's windows tab, it shows
> > outlook as the parent window).
> >
> > 2. How can I make my preference window always on top of the outlook window
> > so that if it is not closed, user cannot focus back to outlook. this is
> > just
> > like the option window in outlook.
> >
> >
> > Thanks.
>
>
Re: questions about windows relationship and always on top. [message #460334] Wed, 17 December 2008 18:15 Go to previous message
BatKing
Messages: 168
Registered: October 2008
Senior Member
I figure out how to make my window as a Modal Dialog. using showDialog() is
the way to go.

so my only question is, should I still set outlook main window as the parent
window? or just leave it as is now which desktop window is the parent window.

thanks.

"BatKing" wrote:

> Outlook 2003 and 2007. VS 2008 with C# and Shared Add-in is what I am doing.
>
> What I try to do is at some point the my code will create a preference
> window. So I created a Form window with some controls on it. this part is
> straight forward. but I want the window act like application's preference
> window. (for example, outloook's option window).
>
> thanks.
>
>
> "Ken Slovak - [MVP - Outlook]" wrote:
>
> > What version of Outlook, what development platform and language, what code
> > are you using to do what you're doing?
> >
> > --
> > Ken Slovak
> > [MVP - Outlook]
> > http://www.slovaktech.com
> > Author: Professional Programming Outlook 2007.
> > Reminder Manager, Extended Reminders, Attachment Options.
> > http://www.slovaktech.com/products.htm
> >
> >
> > "BatKing" <BatKing@discussions.microsoft.com> wrote in message
> > news:CBDE92EF-6A1F-480B-B6A8-7BDC18012562@microsoft.com...
> > > Hi,
> > >
> > > I created a preference window for my outlook add-in with windows forms. I
> > > have 2 questions.
> > >
> > > 1. should the preference window be the child window of outlook main
> > > window?
> > > if Yes how to make it move outside the outlook window? If I set the parent
> > > window as outlook window, then my window cannot move outside and my window
> > > is
> > > kind of flicking and got overlapped by outlook windows (just partially. it
> > > seems outlook is try to draw over my preference window). However if I use
> > > Spy++ and look at the option window of outlook, it is a child window of
> > > outlook and can still move outside. (I am a noob here. but the tree
> > > structure
> > > in spy++ is different for this kind of child window. it is not a sub tree
> > > item under outlook window. However in the property's windows tab, it shows
> > > outlook as the parent window).
> > >
> > > 2. How can I make my preference window always on top of the outlook window
> > > so that if it is not closed, user cannot focus back to outlook. this is
> > > just
> > > like the option window in outlook.
> > >
> > >
> > > Thanks.
> >
> >
Re: questions about windows relationship and always on top. [message #460337] Thu, 18 December 2008 07:06 Go to previous message
kenslovak
Messages: 13351
Registered: May 2006
Senior Member
I still have no idea how you were setting the parent/child relationship.

Is your window appearing behind the main Outlook window (Explorer)?

When I open a Windows form in an addin, let's say from a button on a
toolbar, the window appears in front of the main Outlook window and since
it's modal I can't click on the main Outlook window due to the modality.
What are you seeing that's different?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"BatKing" <BatKing@discussions.microsoft.com> wrote in message
news:29F23244-FE79-415B-9ADD-386738E3C745@microsoft.com...
>I figure out how to make my window as a Modal Dialog. using showDialog() is
> the way to go.
>
> so my only question is, should I still set outlook main window as the
> parent
> window? or just leave it as is now which desktop window is the parent
> window.
>
> thanks.
Previous Topic:Unexpected email message
Next Topic:Publishing forms
Goto Forum: