Qbasicnews.com

Full Version: Console program questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Firstly, I'd like to thank Mr. Victor for freeBASIC because it is the coolest thing ever.

Secondly, I have these questions:

How does one turn the mouse cursor off in a fullscreen console program?

Is it possible to make a console program start up in fullscreen?

Is there a way to disable CTRL+BREAK and CTRL+C in a console program?
Quote:Is it possible to make a console program start up in fullscreen?

SetConsoleDisplayMode in kernel32.dll will do this.
However, it is not converted in the current "bi" files and seeing as how VB does not really do console programs...
VB does console programs fine, just not intrinsicly...
LOCATE , , 0 will turn the cursor off (use LOCATE , , 1 to turn it on again).

CTRL+C may be disabled later, but it's useful now with beta versions to kill the process ;)

It's not possible to start in fullscreen, there's no compile- time"setting" to make Windows do that, sorry.
How about some compiler option where you can specify the "kill" key?

Or enable/disable it...


When I develop programs, and messup, and happen to be in fulslcreen, it would be nice not to have to press ctrlaltdel, but just ctrlc, IMO...
LOCATE , , 0 doesn't affect the MOUSE cursor, but the TEXT one.
There is no mouse cursor in a fullscreen console app. (i.e. if you hit Alt+Enter, the hardware text mode is used)
Quote:There is no mouse cursor in a fullscreen console app. (i.e. if you hit Alt+Enter, the hardware text mode is used)

There is. Try to move your mouse when in fullscreen (in Windows NT, 2000 and XP).
Well, then, maybe it's a hardware difference; my console (WinXP Pro with nVidia GeForce 4 MX 440) doesn't show a mouse pointer even when I jiggle the mouse in fullscreen mode...

If you _really_ need to hide the mouse on Win32, you can use the ShowCursor API (from USER32) - the docs are on MSDN.

Code:
Declare Function ShowCursor Lib "user32" Alias "ShowCursor" ( ByVal bShow As Integer )

' show cursor
Call ShowCursor(1)

' hide cursor
Call ShowCursor(0)