Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
console only OR screen only
#1
I'm building a small console utility.
If a parameter is given, the utility should run in the console and print the result there.
But if no parameter is given, a screen interface should be shown where user can enter parameter(s) and play with result.

This basically means, I want console:only when command$<>"" ELSE Screen:only

Code: (Select All)
$Console
If Command$ <> "" Then
  _ScreenHide
  _Console On
  _Dest _Console
Else
  _Console Off
  _ScreenShow
  _Dest 0
End If
Print "this is it"

If I run this program a very brief flickering can be observed in both cases:
- when doubleclick the exe, I see briefly a console window before the screen is shown and console window disappears
- when at commandprompt including parameter, a screen briefly comes up and disappears. (brief window focus change)

Anyone a good idea/approach to have 1 and only one of them from the very first beginning?
45y and 2M lines of MBASIC>BASICA>QBASIC>QBX>QB64 experience
Reply


Messages In This Thread
console only OR screen only - by mdijkens - 09-04-2024, 07:47 PM
RE: console only OR screen only - by DSMan195276 - 09-04-2024, 08:05 PM
RE: console only OR screen only - by mdijkens - 09-04-2024, 09:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Tab() special behaviour in Console? zaadstra 17 1,265 12-06-2025, 02:08 PM
Last Post: bplus
  Make IDE $Console:Only output readably large dakra137 1 523 10-10-2025, 12:21 PM
Last Post: hsiangch_ong
  No warning to mix screen 0 and screen graphic commands! TempodiBasic 8 1,793 06-16-2023, 11:36 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: