Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB sample to VFP
Message
From
27/01/2001 01:29:01
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00468999
Message ID:
00469357
Views:
11
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform