I am using the MappointControl on a form in a Visual Basic program and there seems to be a limit on the length of the string passed to the OpenMap method. I am using the full path in the string since my ptm file is not in the MapPoint default directory. If the string length <= 126 the map opens correctly; but if the string length is >= 127, then I get the following error in the Visual Basic debugger:
Run-time error '16385':
The file "..." cannot be located. Retype the filename and try again.
The file exists! If I use MapPoint outside the VB program it opens fine. I have carefully debugged this and the only difference is the length of the string passed to OpenMap method. There does not seem to be a way to change the default directory to avoid using the full path. The DefaultFilePath and Path properties of the MapPoint Application and Map objects are both read-only.
Any comments???