[Gambas-user] who to detect if are running inside IDE

ML d4t4full at ...626...
Mon Jul 3 19:33:02 CEST 2017


On 03/07/17 14:23, PICCORO McKAY Lenz wrote:
> a piece of code to who to detect if are running inside IDE?  any ideas how
> to?
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
In the old days of VB6 I tried to print the result of 1/0 to the DEBUG
pane. Since output to the debug pane is ignored in VB6 compiled, there
would be no error in the final compiled app.
I don't know if Gambas does the same, but try this:

Function InIDE() As Boolean

  Dim retVal As Boolean = False

  Try Debug (1/0)
  retVal = (Error.Code <> 0)
  Error.Clear

  Return retVal

End

Hope it helps,
zxMarce





More information about the User mailing list