Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - How do I make floating windows outside of my application?

 
 
Old 03-09-2006   #1 (permalink)
Michael Sheakoski


 
 

How do I make floating windows outside of my application?

Hello. In Expression Interactive Designer you can detach tool windows from
the docked area and put them outside of the application on your desktop if
you want. Or in certain programs like Outlook there is a little
popup/notification window in the bottom right of the screen when you recieve
a new email. How is this possible to do in WinFX/XAML? Is the markup for
these detached windows contained in the XAML for the main scene or is the
code in a seperate XAML file (scene) that is spawned by the main program? My
best guess is that it is a seperate window since any markup in the main xaml
would be a child of the main window and contained only inside of it?

Thank you,
Michael

My System SpecsSystem Spec
Old 03-09-2006   #2 (permalink)
Dennis Cheng [MSFT]


 
 

Re: How do I make floating windows outside of my application?

Yes, you can easily create a custom control to do it because we don't have a
stock dockable window control. Check out the TearOffPanel control in the
SdkViewer application sample to get you started. It's in the Windows SDK.

For the window animations and transparency, use the new
HwndSourceParameters.UsesPerPixelOpacity that made it into the February CTP.
It goes something like this:

HwndSourceParameters param = new HwndSourceParameters("Toast",
0, 0);
param.UsesPerPixelOpacity = true;
param.ExtendedWindowStyle = WS_EX_TOPMOST | WS_EX_TOOLWINDOW;

HwndSource source = new HwndSource(param);
source.RootVisual = new Button();

ShowWindow(source.Handle, SW_SHOW);

More info about HwndSource at http://blogs.msdn.com/nickkramer/atom.aspx



"Michael Sheakoski" <MichaelSheakoski@discussions.microsoft.com> wrote in
message news:363D5B71-8F1A-4666-BC5F-E91CB02D5C6A@microsoft.com...
> Hello. In Expression Interactive Designer you can detach tool windows
> from
> the docked area and put them outside of the application on your desktop if
> you want. Or in certain programs like Outlook there is a little
> popup/notification window in the bottom right of the screen when you
> recieve
> a new email. How is this possible to do in WinFX/XAML? Is the markup for
> these detached windows contained in the XAML for the main scene or is the
> code in a seperate XAML file (scene) that is spawned by the main program?
> My
> best guess is that it is a seperate window since any markup in the main
> xaml
> would be a child of the main window and contained only inside of it?
>
> Thank you,
> Michael



My System SpecsSystem Spec
Old 04-20-2006   #3 (permalink)
Stefc


 
 

Re: How do I make floating windows outside of my application?

I use the same code you mentioned to make a transparent splash screen the
only stuff I can't work out is that the "HwndSource source" appears in the
taskbar

If I look in the documentation for CreateWindowEx() for the WS_EX_XXXX flags
it seems that the WS_EX_APPWINDOW is setted inside of the HwndSource()
constructor. This is what I don't want for a splash screen I created with WPF

The rest of your very helpfull sample is very nice for creating a smart
splash screen with WPF !!!

Instead of a button I use a Page for assign to RootVisual

--
Mfg Stefc


"Dennis Cheng [MSFT]" wrote:

> Yes, you can easily create a custom control to do it because we don't have a
> stock dockable window control. Check out the TearOffPanel control in the
> SdkViewer application sample to get you started. It's in the Windows SDK.
>
> For the window animations and transparency, use the new
> HwndSourceParameters.UsesPerPixelOpacity that made it into the February CTP.
> It goes something like this:
>
> HwndSourceParameters param = new HwndSourceParameters("Toast",
> 0, 0);
> param.UsesPerPixelOpacity = true;
> param.ExtendedWindowStyle = WS_EX_TOPMOST | WS_EX_TOOLWINDOW;
>
> HwndSource source = new HwndSource(param);
> source.RootVisual = new Button();
>
> ShowWindow(source.Handle, SW_SHOW);
>
> More info about HwndSource at http://blogs.msdn.com/nickkramer/atom.aspx
>
>
>
> "Michael Sheakoski" <MichaelSheakoski@discussions.microsoft.com> wrote in
> message news:363D5B71-8F1A-4666-BC5F-E91CB02D5C6A@microsoft.com...
> > Hello. In Expression Interactive Designer you can detach tool windows
> > from
> > the docked area and put them outside of the application on your desktop if
> > you want. Or in certain programs like Outlook there is a little
> > popup/notification window in the bottom right of the screen when you
> > recieve
> > a new email. How is this possible to do in WinFX/XAML? Is the markup for
> > these detached windows contained in the XAML for the main scene or is the
> > code in a seperate XAML file (scene) that is spawned by the main program?
> > My
> > best guess is that it is a seperate window since any markup in the main
> > xaml
> > would be a child of the main window and contained only inside of it?
> >
> > Thank you,
> > Michael

>
>
>

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Execute VBScript from a floating popup menu VB Script
Vista speech results in Floating point division by zero exception Vista General
Floating Toolbar Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46