Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

Mappoint SaveAs Method

This is a discussion on Mappoint SaveAs Method within the MapPoint Desktop Discussion forums, part of the Map Forums category; Is there something wrong with my code (VB.Net Windows forms app)? Private Sub MapFrm_Closed(ByVal sender As Object, ByVal e As ...

  1. #1
    mmichaels is offline Junior Member White Belt
    Join Date
    Jan 2004
    Posts
    6

    Mappoint SaveAs Method

    Is there something wrong with my code (VB.Net Windows forms app)?

    Private Sub MapFrm_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed

    ntMap.ActiveMap.SaveAs(Environment.CurrentDirector y + "\" + "test.ptm", MapPoint.GeoSaveFormat.geoFormatMap, False)
    ntMap.ActiveMap.Saved = True

    End Sub

    There is no file being saved anywhere to disk. Am I missing something?

    Thanks!
    Marc

  2. #2
    Magnus W. Andersson is offline Junior Member White Belt
    Join Date
    Feb 2004
    Posts
    1

    Re: Mappoint SaveAs Method

    Try not to cancatenate the string with '+', always use the '&' ampersand character

    Quote Originally Posted by mmichaels
    Is there something wrong with my code (VB.Net Windows forms app)?

    Private Sub MapFrm_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed

    ntMap.ActiveMap.SaveAs(Environment.CurrentDirector y + "\" + "test.ptm", MapPoint.GeoSaveFormat.geoFormatMap, False)
    ntMap.ActiveMap.Saved = True

    End Sub

    There is no file being saved anywhere to disk. Am I missing something?

    Thanks!
    Marc

  3. #3
    mmichaels is offline Junior Member White Belt
    Join Date
    Jan 2004
    Posts
    6

    Mappoint SaveAs method

    changed the code to:

    Private Sub MapFrm_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
    ntMap.ActiveMap.SaveAs(Environment.CurrentDirector y & "\test.ptm", MapPoint.GeoSaveFormat.geoFormatMap, False)
    ntMap.ActiveMap.Saved = True

    End Sub

    still no luck.

    marc

  4. #4
    mmichaels is offline Junior Member White Belt
    Join Date
    Jan 2004
    Posts
    6

    mappoint saveas method

    Figured it out. Changed code to read:

    ntMap.SaveMapAs(myParent.CurrDir & "\SavedMaps\" & Me.Text & ".ptm")


    (Used the SaveMapAs method instead of the SaveAs method).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SaveMapAs and SaveAs
    By TheJudge in forum MapPoint Desktop Discussion
    Replies: 12
    Last Post: 04-14-2004, 06:06 PM
  2. PrintOut method with MapPoint ActiveX control?!!
    By TheJudge in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 04-13-2004, 06:35 PM
  3. Create Mappoint.Application with CreateObject method
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-03-2004, 08:03 AM
  4. MapPoint Map.SaveAs HTML
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-11-2003, 10:15 AM
  5. Replies: 1
    Last Post: 05-29-2003, 07:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27