Make floating windows accessible through ALT+Tab

Topics related to the Krypton Docking.

Moderators: Phil Wright, Chris Porter

Make floating windows accessible through ALT+Tab

Postby Judah » Thu Aug 27, 2009 4:46 am

Hi,

We'd like to make floating windows visible in the task bar and also accessible via ALT+Tab.

Possible?
Judah
 
Posts: 98
Joined: Tue Jul 18, 2006 4:58 am

Re: Make floating windows accessible through ALT+Tab

Postby Phil Wright » Thu Aug 27, 2009 6:26 pm

You would need to hook into the KryptonDockingManager.FloatingWindowAdding. Then inside the handler do this...

private void kryptonDockingManager1_FloatingWindowAdding(object sender, FloatingWindowEventArgs e)
{
e.FloatingWindow.ShowInTaskbar = true;
}

This will cause it to appear on the task bar but this is a bad idea. When you hide the contents of the floating window the window is set to be hidden but would still appear as an entry on the task bar. So you would have an entry per floating window includes those currently hidden. Plus that does not make it appear in the ALT+TAB list because the floating windows are children of the main window and the ALT+TAB list only shows top level windows.
Phil Wright
Site Admin
 
Posts: 2720
Joined: Thu Apr 13, 2006 2:55 pm
Location: Melbourne, Australia

Re: Make floating windows accessible through ALT+Tab

Postby Judah » Fri Aug 28, 2009 12:40 am

Thanks for the reply, Phil.
Judah
 
Posts: 98
Joined: Tue Jul 18, 2006 4:58 am

Re: Make floating windows accessible through ALT+Tab

Postby Judah » Fri Aug 28, 2009 3:08 am

FYI, Phil, the scenario we are trying to support is something like Google Chrome's functionality: drag a tab out of the tab control and make a new window.
Judah
 
Posts: 98
Joined: Tue Jul 18, 2006 4:58 am

Re: Make floating windows accessible through ALT+Tab

Postby Phil Wright » Fri Aug 28, 2009 3:01 pm

Although it looks like the docking system is almost the same as what you need, in practice I do not think it can do this, even with event handling to tweak actions. The floating windows creates are not top level windows but instead owned by the main form.
Phil Wright
Site Admin
 
Posts: 2720
Joined: Thu Apr 13, 2006 2:55 pm
Location: Melbourne, Australia

Re: Make floating windows accessible through ALT+Tab

Postby Judah » Sat Aug 29, 2009 4:37 am

Thanks for the honest answer, Phil. I've been able to hack the current docking system a bit by calling

parent.RemoveOwnedForm(floatingWindow);
floatingWindow.ShowInTaskbar = true;

and some other calls which make the window appear in the taskbar, ATL+Tab-able, etc.

Would you recommend against using KryptonDocking for this scenario? Is this gonna get too hackish? :)
Judah
 
Posts: 98
Joined: Tue Jul 18, 2006 4:58 am

Re: Make floating windows accessible through ALT+Tab

Postby Phil Wright » Sat Aug 29, 2009 1:16 pm

I cannot guarantee it will work as expected when you make fundamental changes. You can give it a try and see it is works. But you might find incorrect behaviour that is hard to then fix.
Phil Wright
Site Admin
 
Posts: 2720
Joined: Thu Apr 13, 2006 2:55 pm
Location: Melbourne, Australia

Re: Make floating windows accessible through ALT+Tab

Postby Judah » Tue Sep 01, 2009 12:17 am

Alright, thanks. We'll head down this path cautiously.
Judah
 
Posts: 98
Joined: Tue Jul 18, 2006 4:58 am


Return to Krypton Docking

Who is online

Users browsing this forum: Google [Bot] and 0 guests