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



Users browsing this thread: 2 Guest(s)