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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to