Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GPS - ActiveX
Message
 
À
24/08/2005 06:54:38
Fida Shamsoodeen
Combined Systems (Pty) Ltd
Centurion, Afrique du Sud
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
01043216
Message ID:
01043245
Vues:
12
Fida,
Here it is the translated samples

Serial Port Sample:
FUNCTION SPWaypointsExample()
  LOCAL myGPS       AS GPSLibrary2PE.GPSDevice,
        myWayPoints AS GPSLibrary2PE.GPSWaypoints,
        WayPoints   AS GPSLibrary2PE.GPSWaypoint

  myGPS = CREATEOBJECT("PSLibrary2PE.GPSDevice")

  * Open the serial port, COM1 in this example
  myGPS.Link.PortOpen(1)

  * Retrieve the Waypoints from the GPS
  myWaypoints = myGPS.GetWaypoints()

  * Process the waypoints as required, in this example simply
  * print a list of the Waypoints to the dedug window
  For Each Waypoint In myWaypoints
    With Waypoint
      ? "Identifier=", .Identifier, "Latitude=",.Latitude, "Longitude=",Longitude
    EndWith
  Next

  * Close the port
  myGPS.Link.PortClose()

  * Tidy up
  STORE NULL TO myGPS, myWayPoints, WayPoints
  RELEASE myGPS, myWayPoints, WayPoints

RETURN ""
USB Example
FUNCTION USPWaypointsExample()

  LOCAL myGPS       AS GPSLibrary2PE.GPSDevice,
        myWayPoints AS GPSLibrary2PE.GPSWaypoints,
        WayPoints   AS GPSLibrary2PE.GPSWaypoint

  myGPS = CREATEOBJECT("PSLibrary2PE.GPSDevice")

  * Retrieve the Waypoints from the GPS
  myWaypoints = myGPS.GetWaypoints

  * Process the waypoints as required, in this example simply
  * print a list of the Waypoints to the dedug window
  For Each Waypoint In myWaypoints
    With Waypoint
       ? "Identifier=",.Identifier, " Latitude=", .Latitude," Longitude=",.Longitude
    EndWith
  Next

  * Tidy up
  STORE NULL TO myGPS, myWayPoints, WayPoints
  RELEASE myGPS, myWayPoints, WayPoints

RETURN ""
You can use ObjectBrowser then navigate, click open->Browse, navigate to that DLL "C:\Program Files\Waymex\GPSLibrary_PE\WMXGPSGRMNPE.dll" and select it.

Keep in mind that I could test these codes because I have no GPS installed.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform