HOME       >>       Programming

How To Make Both Windows Look Like Active At Same Time


magiccode91405241511

Hi,

I'am creating some UI that will have some floating windows like the code below.
But by default, when one window was active, the other will lost focus and became gray in color.
How can I made both look like active. Much like some graphics apps such as photoshop tool window.

Thanks,


/** * * **/using System;using System.Windows.Forms;using System.Drawing;public class Program{ public static void Main(string[] args) { form1 AppMain = new form1(); Application.Run(AppMain); }}public class form1 : System.Windows.Forms.Form{ private ToolPanel tool; public form1() { this.Location = new Point(0, 0); this.Size = new Size(200, 200); this.tool = new ToolPanel(); this.tool.Owner = this; this.Load += new EventHandler(form1_load); } private void form1_load(object sender, EventArgs e) { if (tool != null) { tool.Show(); } }}public class ToolPanel : System.Windows.Forms.Form{ public ToolPanel() { this.Size = new Size(10, 200); this.ShowInTaskbar = false; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Text = "Tools"; }}


wutske

afaik the floating windows in photoshop become inactive too. Basicly, there's no such thing as 2 active windows in windows, there's always maximaly 1 active window and the other ones are in the background. What do you need 2 active windows for ?


xboxrulz1405241485

I've never heard an operating system allowing that. Thus, I don't think it's really possible. I know in KDE, you might be able to do it if you set the inactive colour and the active colour the same.However, it will be hell confusing.xboxrulz


magiccode91405241511

I haven't made all things clear.By default, when a window is active or inactive.It will get a message then to redraw the window to represent it's state.I want to override this in tool window so that it won't draw the inactive state and therefore look like active.Thanks,


FirefoxRocks

Why would you need to make 2 windows active or look active at the same time? You can probably do that within the Apperance dialog in Windows by changing the colours of inactive and active windows, but it would be extremely confusing especially if you have something like 5 windows open.


xboxrulz1405241485

I haven't made all things clear.
By default, when a window is active or inactive.
It will get a message then to redraw the window to represent it's state.
I want to override this in tool window so that it won't draw the inactive state and therefore look like active.
Thanks,


Well, i understood that. However, I don't think anyone allowed this to happen because all the applications you see when you click on another focal point, it lists itself inactive. I think this is got to do with the operating system and not the programming language itself.

xboxrulz

magiccode91405241511

It is because the windows have owner and owned relationship.

When the main window was minimized.

Other window do it too.

 

And the image shows a sample.

When illustrator minimized, it's tools panel follows it.

Also, when main window active, the tools panel still look like active.

 

 

Thanks,

 


xboxrulz1405241485

True, hmm.. I don't have an answer to that, because I think the operating system isn't treating that toolbar as a separate window, so it isn't affected by what I explained earlier.You need someone that is specialized in UI designs to help u.xboxrulz


wutske

I don't think this is going to work if you define the toolbox as a new window.
Maybe this helps: http://forums.xisto.com/no_longer_exists/
These toolbars can be undocked, so they are floating, but still tight to the main window


magiccode91405241511

Wutske, Thanks,I'am checking it.


iGuest

How To Make Both Windows Look Like Active At Same TimeHow To Make Both Windows Look Like Active At Same Time

Right click on the desktop and select properties. Click on the tab Appearance

and click on Advanced. Under the title Item, in the drop down menu select

Active title Bar and select the color. Then select the option Inactive Title Bar from

the Items drop down menu and choose the color. Click OK and view the effects.



VIEW ORIGINAL REGISTER GET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.