How do i set a console application to be the top most window. I am building the console application in .NET (i am using C# and maybe even pinvokes to unmanaged code is ok).
I thought that i could have my console application derive from Form class
class MyConsoleApp : Form {
public MyConsoleApp() {
this.TopLevel = true;
this.TopMost = true;
this.CenterToScreen();
}
public void DoSomething() {
//....
}
public static void Main() {
MyConsoleApp consoleApp = new MyConsoleApp();
consoleApp.DoSomething();
}
}
However this doesn't work. I am not sure if the properties set on the windows form is applicable to the console UI.