Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Inline window?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th July 20:15
batking
External User
 
Posts: 1
Default Inline window?


Hi,

I am working on a plugin which will create a inline window within outlook to
show some webservice data with embbed url within a email. the outlook object
model doesn't seem to support this. so I am doing something like this.

1. create a usercontrol panel then put a webBrowser object within it.
2. find the outlook window handle with
System.Diagnostics.Process.GetProcessesByName.
3. after create the usercontrol panel, then use win32 SetParent to set the
outlook window as the parent of the usercontrol panel.

this work. however this also means my inline window's size is limited by the
outlook window. this creates a problem if the user had sized the outlook
window very small. my inline panel will be "clipped" by the outlook main
window.

is there anyway I can create a inline window bigger than the outlook window?
my inline window's size is fixed.

Thanks.

PS, I want to have a mouse_leave event to close the inline window. and if I
register the even with the Panel, the mouse_leave event won't fire because
the panel is totally covered by the webBroswer control. anyway to handle this?
  Reply With Quote


  sponsored links


2 25th July 20:15
ken slovak - [mvp - outlook]
External User
 
Posts: 1
Default Inline window?


If the pane is a child window of the Outlook window then you are limited to
displaying the pane within the confines of the main window boundaries. It
can be larger than the space assigned to it and use scroll bars to move
around the pane, but it can't visibly be larger than the space it has.

--
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
  Reply With Quote


  sponsored links


3 25th July 20:15
batking
External User
 
Posts: 1
Default Inline window?


Thanks,

is there anyway to make outlook not the parnet window? I tried that but my
inline window doesn't display anywhere. or is that means I have to go Windows
Form or WPF? but that will make a separated window and that is not what I
want.
  Reply With Quote
4 25th July 20:16
ken slovak - [mvp - outlook]
External User
 
Posts: 1
Default Inline window?


If Outlook isn't the parent window then the window you create will be a
separate window no matter how you create or show it. Even if the window you
create is set to a top level window with no parents it would still be a
separate window.

I think that if the Outlook window is resized so that only part of your pane
is showing the user would have to accept that, just as they would any other
Outlook window that doesn't show everything due to its size.

--
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
  Reply With Quote
5 25th July 20:16
batking
External User
 
Posts: 1
Default Inline window?


Thanks.

I kind of make the inline window work. but I have 2 questions.

1. I create the inline window as a UserControl instead of Form because it
look more like a inline window (ie no title bar .... ). then I set the parent
as the desktop. So my window can be bigger than the outlook app window. I use
a mouse leave event to close the window, so that kind of create a inline
window "effect". But how can I make the TaskBar button disapper the my
UserControl window appear? a UserControl class don't have a ShowInTaskbar
property to set. and FindForm() always return null.

I have tried the winApi trick as following in my UserControl window's
constructor but without success.

int style = SafeNativeMethods.GetWindowLong(this.Handle,
SafeNativeMethods.GWL_EXSTYLE);
style &= ~(int)SafeNativeMethods.exStyles.WS_EX_APPWINDOW;
style = style | (int)SafeNativeMethods.exStyles.WS_EX_TOOLWINDOW;
SafeNativeMethods.SetWindowLong(this.Handle,SafeNa tiveMethods.GWL_EXSTYLE,
style);

2. right now, I just added a WebBrowser on my UserControl Window. if my
webBrowser is covering the whole UserControl window (dock on it), then the
mouse_leave event is not fired. if I make my webBrowser control smaller and
leave some extra area around, then mouse_leave event is fired when my mouse
leaving extra area. How to make the WebBrowser component detect the
mouse_leave event?

Thanks.
  Reply With Quote
6 25th July 20:16
ken slovak - [mvp - outlook]
External User
 
Posts: 1
Default Inline window?


I think you answered your own question, why not use a Windows Form for your
panel?

You can prevent it from showing in the task bar and you can set it to have
no form borders, which would get rid of the title bar. FindForm() would also
then work.

For #2, assuming you switch to a form, why not just handle the form events
for the mouse and/or keyboard? Just set KeyPreview to true.

--
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
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666