09-04-2024, 07:47 PM
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
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?
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