Duly acknowledged! On 11/12/22 10:06 pm, Bruce Steers wrote: > Try this in your startup class > > #If Exec > Quit > #Endif > > When compiling an exe gambas sets the x flag. The IDE does not when > debugging. > > So the above code #If Exec is true if run from desktop and not if run > from IDE