Multiple Consoles in one window - c#

I'm making a console application and ran into a problem. There are multiple console windows open at the same time and it's really painful to navigate through. Is it possible to create a "master window" - One window that servers as a base for multiple other windows?
Image explanation:

Related

How to implement to restore the last saved or opened instance or page for a windows application in case of crashed?

I wanted to implement one of my idea where I want to restore or open the saved pages again of the last instance for a window application in case of crashed or sudden shut down.
The current approach, as we have to re-configured all the steps and actions as we have done before crashing.
Background - We have a WPF windows application with C# and legacy code.
Suggest me any suggestion or way to achieve this.

Manage Alt+Tab in .net application

I am developing a simple chat application which works in LAN. I have a problem in ALt+Tab.
When I open 2 applications (One is mine and another one say Firefox), now it switches properly between two windows when I press Alt+Tab.
Now I will minimize firefox. So now my app is the only one in foreground. Now if I press Alt+Tab, firefox comes foreground which is not expected (or I dont expect).
How to make Alt+Tab not work when all windows are in minimized state ?
I am using vb.net but c# is also OK for me and for example I have given firefox; there may be n number of windows in minimized state.
Please help me.
Pressing ALT + TAB in Windows (or other OS) is supposed to switch between every active application that is running and has a top-level Window. So the behavior you are describing is actually working the way it is supposed to.
More on Wikipedia about that.
However, it is possible to hack this behavior by capturing the ALt-Tab event. It is actually used by several remote control application so they can transmit commands from one computer to another.
Here is a start up guide, but beware that you get into Windows weird APIs and low-level functionnality. Use at your own risk...

Running multiple instances of windows forms application

Windows forms application should be started multiple times when user clicks on the button inside the main form and he/she should be able to switch between running instances from application menu. Applications should be isolated from each other, so static classes and libraries should not be shared between instances.
One apparent way is to use separate processes, but it will be too heavy, may be I should use application domains,but there is no such sample in the net.
Can anyone suggest the best solution for this problem ?

How to check if a window handle is for a console window?

I have an application, using one process, that has two windows. Both these windows have the same title. One is the main app window, that the user does all their interaction with. The other is a console window which is used purely for live logging of commands executed in the main window.
I'm currently implementing a Mutex and if the application is open already, I want to restore & switch to the currently running main application window (not the console window). However, given that both windows have the same title and the same process, it's proven hard to distinguish between the two.
Is there a way to determine if a window is a console window? Or any other way to distinguish between these two windows?

Setting C# console application location to a secondary screen

Overview: I am working on a project which involves a WCF and multiple types of clients. I have created several Test clients and I have a WCF which is hosted in a console app.
This results in me having multiple application windows (I currently have 4) when debugging and every time I run them I have to arrange them on multiple screens (I have 2).
Question: I wonder is there a way to set a position of Console application to the secondary screen without a need to drag it all the time.
Move the console to the wanted screen. Go to properties. Note the location. Use that.
I think that you'll find that the answer given on this thread will cover you.
It'll mean saving the position of the console window when it closes and also checking that the position is within the displayable area of the desktop on startup, but it demonstrates how to position the console window for both console applications and windows forms ones.

Categories