Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to prevent console from being moved by user? Snap windows feature is changing size of Console. #91

Open
haseakash opened this issue Mar 6, 2022 · 1 comment

Comments

@haseakash
Copy link

haseakash commented Mar 6, 2022

im facing big issue with console app using c# core 2.0.

I still dident find any right aswer to lock console window position.
It is movable by the user.

Main problem is if user move console window to any corner of current resolution then console changing its original size even if i set fixed size in program
my certain Text are showing bad after changing cmd size.

i need a real solution for console app.

please help somebody

@goblinfactory
Copy link
Owner

goblinfactory commented Mar 6, 2022

Hi Haseakash

On Windows, you can use

   new PlatformStuff().LockResizing(width, height);

Or you can use a HighSpeedwriter, which will automatically lock the screen and it calls the code above in the constructor, as can be seen here;

new PlatformStuff().LockResizing(width, height);

If you find Konsole useful, please consider sponsoring Konsole to show your support, using the link below;
https://github.com/sponsors/goblinfactory

Thank you,
regards,

Alan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants