Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB sample to VFP
Message
De
27/01/2001 01:29:01
 
 
À
26/01/2001 09:05:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00468999
Message ID:
00469357
Vues:
10
>Hi All,
>
>Could some one push me in the right direction for converting this little bit off VB to VFP, as the sample application which came with the control is in VB
>
>
>Private Sub Command1_Click()
> Dim X, Y
> InfoMapControl1.LocateOnePostcode Text4, X, Y, -1
>End Sub
>

Yiu have an object InfoMapControl1 which has to be instantiated (probably by CreateObject());  you call the method LocateOnePostcode passing it three text strings and a numeric memvar, and expect to get back a number.  Your code might looik something like:

<pre>oIMC = CREATEOBJ(<i>ProgId of the Control</>)
cPostCode = '06516'
cX = SPACE(30)
cY = SPACE(30)
nResult = oIMC.LocateOnePostCode(cPostCode,@cX, @cY, -1)
>The help file says
>short LocateOnePostcode(
> BSTR Postcode, // the postcode you want to search for
> BSTR X, // buffer for x coordinate
> BSTR Y, // buffer for y coordinate
> short SetMapPosition // option to centre the map on the postacode
>)
>
><\pre>
>
>TIA
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform