questions about windows relationship and always on top.

B

BatKing

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.
 
K

Ken Slovak - [MVP - Outlook]

What version of Outlook, what development platform and language, what code
are you using to do what you're doing?
 
B

BatKing

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.
 
B

BatKing

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.
 
K

Ken Slovak - [MVP - Outlook]

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?
 
B

BatKing

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. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top