Nov 22, 2009
Pages: 1, 2

How To Make Both Windows Look Like Active At Same Time

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Programming General > C# .NET

How To Make Both Windows Look Like Active At Same Time

magiccode9
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,


CODE
/**
*  
*
**/


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


 

 

 


Comment/Reply (w/o sign-up)

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 ?

Comment/Reply (w/o sign-up)

xboxrulz
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

Comment/Reply (w/o sign-up)

magiccode9
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,

Comment/Reply (w/o sign-up)

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.

Comment/Reply (w/o sign-up)

xboxrulz
QUOTE(magiccode9 @ Oct 12 2008, 11:32 AM) *
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

Comment/Reply (w/o sign-up)

magiccode9
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,



Comment/Reply (w/o sign-up)

xboxrulz
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

Comment/Reply (w/o sign-up)

wutske
I don't think this is going to work if you define the toolbox as a new window.
Maybe this helps: http://www.techotopia.com/index.php/Buildi...d_Visual_Studio
These toolbars can be undocked, so they are floating, but still tight to the main window wink.gif

Comment/Reply (w/o sign-up)

magiccode9
Wutske, Thanks,

I'am checking it.

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Pages: 1, 2
Similar Topics

Keywords : Windows Active


    Looking for make, windows, active, time

See Also,

*SIMILAR VIDEOS*
Searching Video's for make, windows, active, time
advertisement



How To Make Both Windows Look Like Active At Same Time

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com