【问题标题】:How can I tell if my code is running inside a Console or desktop application?如何判断我的代码是在控制台还是桌面应用程序中运行?
【发布时间】:2012-08-21 08:19:50
【问题描述】:

如何判断我的 RealBasic 代码是在控制台还是桌面应用程序中运行?

【问题讨论】:

    标签: realbasic xojo


    【解决方案1】:

    你可以用这个条件句:

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

    【讨论】:

    • 请注意,对于 TargetHasGUI,Web 应用程序也会返回 True。
    • 更正:Web 应用返回 False
    猜你喜欢
    • 2012-01-07
    • 1970-01-01
    • 2011-02-23
    • 1970-01-01
    • 2021-04-16
    • 1970-01-01
    • 1970-01-01
    • 2016-04-17
    • 2015-07-27
    相关资源
    最近更新 更多