Screen and console

New to FreeBASIC? Post your questions here.
Post Reply
AnotherLife
Posts: 94
Joined: Feb 07, 2011 22:48

Screen and console

Post by AnotherLife »

I'm using Screen 19, 8, 1, GFX_WINDOWED Or GFX_NO_SWITCH

It's kind of a terminal with a prompt. Is there a way to have a bigger console height and have a slider to go up and down ? Because now when I print lots of stuff the older stuff gets lost.
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: Screen and console

Post by sir_mud »

If you're only doing text you don't have to use the screen statement, then you can resize your console and scrollback to your heart's content.
AnotherLife
Posts: 94
Joined: Feb 07, 2011 22:48

Re: Screen and console

Post by AnotherLife »

Hmm, just did that and you're right I think. I'm using line input, too.

But it doesn't look as cool as it did before, got to fix that hehe. This also renders my nice command parsing code, clipboard handling and keyboard handling useless.

But now I can scroll up and down, paste AND copy , go back in the commandline without using backspace ... :-)
sir_mud
Posts: 1401
Joined: Jul 29, 2006 3:00
Location: US
Contact:

Re: Screen and console

Post by sir_mud »

AnotherLife wrote:But it doesn't look as cool as it did before, got to fix that hehe.
Window's default console font is not pretty, but you can click the icon to get a menu and change it.
AnotherLife
Posts: 94
Joined: Feb 07, 2011 22:48

Re: Screen and console

Post by AnotherLife »

The main problem is that I want a fixed width (100), so I can print my stuff centered etc. And I also want to keep my command prompt at the bottom of the window. So I'm using width 100,37.

But looking at the console window's properties that also sets the screen buffer to these dimensions, so stuff gets permanently lost scrolled off-screen.

[....]
I think I fixed it by calling SetConsoleScreenBufferSize after using width. Eheheheheh

Now with the fixed dimensions, an executable icon, a window title, coloured text it looks cool again :-)
AnotherLife
Posts: 94
Joined: Feb 07, 2011 22:48

Re: Screen and console

Post by AnotherLife »

Also trasparency and accepting drag'n'dropping files, not bad for a console window. Now if I could just disable resizing ...


[...]
And I removed the WS_THICKFRAME extended style, success.

Now to test this on all my virtual machines !
Post Reply