I don't understand why you need stop menu to your project. Why can't you just use the stop button from the IDE?
Jussi On Mon, Jul 3, 2017 at 11:38 PM, adamn...@gmail.com <adamn...@gmail.com> wrote: > On Mon, 3 Jul 2017 20:40:46 +0200 > Tobias Boege <tabo...@gmail.com> wrote: > > > > I'm convinced that no matter how you try to detect if you're run by the > IDE > > or not, someone can create an environment where your test gives the wrong > > answer. I still stand by my statement from two years ago: you shouldn't > care > > where your program is run from in the first place. What problem are you > > trying to solve by knowing that? > > > > Regards, > > Tobi > > > Since you asked :-) > > Laziness! > > Many times I have a menu item in a form that just "Stop"s the program i.e. > > Private Sub mnuDebug() > Stop > End > > then in the Form_Open() > > #If Exec > mnuDebug.Visible = False > #Endif > > So at development time, or when the customer has a problem, I almost > always have a way to stop the program when it's running in the IDE. > > All this does is "tidy up" the program automatically when run outside the > IDE. If a user wants to go to the extent of creating a non-x version of the > program just to see that menu item - which will do nothing anyway since the > Stop is ignored - then all I can say is "Good luck to them." > > There are probably trickier or even "more correct" ways to hide a menu > item at runtime, but hey! Three lines and "As Far As I Care" - problem > solved. > > b > > -- > B Bruen <adamn...@gnail.com (sort of)> > > ------------------------------------------------------------ > ------------------ > 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 > ------------------------------------------------------------------------------ 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