Jump to content
xisto Community
Sign in to follow this  
magiccode91405241511

How To Make Both Windows Look Like Active At Same Time

Recommended Posts

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";	}}

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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,

Edited by magiccode9 (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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,

 

Posted ImagePosted Image

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.