I tried the following two things:
include "mapbasic.def"
Declare Sub Main
Declare Sub Exit
Sub Main()
If WindowInfo(WIN_MAPBASIC, WIN_INFO_OPEN) then
Close Window WIN_MAPBASIC
End If
End Sub
and
Sub Exit()
End Program
End Sub
But my MapBasic program does not completely exit from MapInfo (close MapInfo).
Best Answer
Let's start by looking at your two statements:
This statement will close the MapBasic Window:
This statement will end your MapBasic application and unload it from memory:
If you want to shot down MapInfo Professional, you should run this statement:
The keyword 'Interactive' makes sure that you are giving the user a chance to save what has not already been saved, either changes to a table or settings to a workspace.