Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 6, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Programmatically Differentiate Between Design Mode and Run Time

This code enables and/or disables functions during design and testing. The code can remain during initial deployment without affecting the end user. Make sure the path string being searched is part of your project path and is not in your final application's directory:

If InStr(App.Path, "VB") Then
        ' Set Test Locations
        ' Modify Settings without changing 
        ' ini or registry settings
        ' Defeat security
        ' Set options
End If

'A simple variant of this technique is

If InStr(App.Path, "VB") Then Stop

You can insert this during debugging, but if you forget, it won't cause users problems.

John Bailey
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date