I don't understand why you need stop menu to your project. Why can't you
Post by a***@gmail.comOn Mon, 3 Jul 2017 20:40:46 +0200
Post by Tobias BoegeI'm convinced that no matter how you try to detect if you're run by the
IDE
Post by Tobias Boegeor 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
Post by Tobias Boegewhere 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
--
------------------------------------------------------------
------------------
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
https://lists.sourceforge.net/lists/listinfo/gambas-user