Click here to Skip to main content
15,917,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to specify the top-left corner at (0, 0), for a console application's window.
How to do it?
Posted
Comments
CPallini 25-Jul-14 6:31am    
Please elaborate, it is not clear. What do you intend to do?
arpoador 26-Jul-14 2:11am    
Imagine my C# console application being instantiated through double-click on File Explorer: it should appear with the top-left corner positioned at screen position (0, 0).
Nothing special, I just want to have it (the console app) open at a specific screen position ( 0,0 in my case).
arpoador 25-Jul-14 6:43am    
Imagine my C# console application being instantiated through double-click on File Explorer: it should appear with the top-left corner positioned at screen position (0, 0).
Nothing special, I just want to have it (the console app) open at a specific screen position ( 0,0 in my case).

1 solution

Hi,

Using this : Link[^]

Enjoy
 
Share this answer
 
Comments
arpoador 25-Jul-14 8:00am    
Thanks, but it doesn't work.
Try this, and see the window being positioned anywhere:

static void Main(string[] args)
{
Console.SetWindowPosition(0, 0);
var v = Console.ReadLine();
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900