Interesting code:
This code was for fun, isn't it cool?
Now execute the following code:
You can get your desired output screen by changing 30 and 57.
#include
<windows.h>
main()
{
while(true)
{
Sleep(100);
SMALL_RECT WinRect = {0, 0, rand() %
100 + 1, rand() % 70 + 1};
SMALL_RECT* WinSize = &WinRect;
SetConsoleWindowInfo(GetStdHandle(STD_OUTPUT_HANDLE), true, WinSize);
}
}
This code was for fun, isn't it cool?
Now execute the following code:
#include
<windows.h>
main()
{
SMALL_RECT WinRect = {0, 0, 30, 57 };// 30 is for changing screen horizontally and 57 for changing vertically.
SMALL_RECT* WinSize = &WinRect;
SetConsoleWindowInfo(GetStdHandle(STD_OUTPUT_HANDLE), true, WinSize);
}
main()
{
SMALL_RECT WinRect = {0, 0, 30, 57 };// 30 is for changing screen horizontally and 57 for changing vertically.
SMALL_RECT* WinSize = &WinRect;
SetConsoleWindowInfo(GetStdHandle(STD_OUTPUT_HANDLE), true, WinSize);
}
You can get your desired output screen by changing 30 and 57.
Thanks for completing my request, your blog is outstanding.
ReplyDeleteI'm loving it.