How can I tell if my code is running inside a Console or desktop application?

163 Views Asked by At

How can I tell whether my RealBasic code is running inside a Console or desktop application?

1

There are 1 best solutions below

2
On BEST ANSWER

You can use this conditional sentence:

#if TargetHasGUI then     
    ' It's running in a desktop app
#else
    ' It's running in a console app
#endif