VBasic Dim Equivalent in VFP 
Author Message
 VBasic Dim Equivalent in VFP

Hi all,

I am trying to use MapObjects (a GIS tool) with VFP 6.0
I have this piece of code as a sample in VBasic.

---------
This example uses the Add method to add MapLayer objects to a Map. To try
this example, paste the code into the Declarations section of a form
containing a CommonDialog control, a CommandButton named Command1 and a Map
named Map1 and then press F5 and click Command1. Move to a folder containing
ESRI shapefiles and open the file.

Option Explicit

Private Sub Command1_Click()
  Dim oConnect As New DataConnection
  Dim oDataset As GeoDataset
  Dim sName As String
  Dim oLayer As MapObjects2.MapLayer

  CommonDialog1.Filter = "ESRI Shapefiles (*.shp)|*.shp"
  CommonDialog1.ShowOpen
  If Len(CommonDialog1.FileName) = 0 Then Exit Sub

  oConnect.Database = CurDir
  If Not oConnect.Connect Then Exit Sub

  sName = Left(CommonDialog1.FileTitle, Len(CommonDialog1.FileTitle) - 4)

  Set oDataset = oConnect.FindGeoDataset(sName)

  If oDataset Is Nothing Then Exit Sub

  Set oLayer = New MapLayer
  oLayer.GeoDataset = oDataset
  Map1.Layers.Add oLayer

End Sub

--------

Could someone tell me which are the equivalents for:
  Dim oDataset As GeoDataset
  Dim oLayer As MapObjects2.MapLayer

Demetrios, Greece



Sat, 08 Mar 2003 13:00:51 GMT  
 VBasic Dim Equivalent in VFP

CREATEOBJECT()
(I'm assuming the dll is MapObjects2...)
oDataset = CREATEOBJECT("MapObjects2.GeoDataset")
oLayer = CREATEOBJECT("MapObjects2.MapLayer")


Quote:
> Hi all,

> I am trying to use MapObjects (a GIS tool) with VFP 6.0
> I have this piece of code as a sample in VBasic.

[snip]

> Could someone tell me which are the equivalents for:
>   Dim oDataset As GeoDataset
>   Dim oLayer As MapObjects2.MapLayer

> Demetrios, Greece



Sat, 08 Mar 2003 03:00:00 GMT  
 VBasic Dim Equivalent in VFP

Thanks a lot.

Demetrios


Quote:
> CREATEOBJECT()
> (I'm assuming the dll is MapObjects2...)
> oDataset = CREATEOBJECT("MapObjects2.GeoDataset")
> oLayer = CREATEOBJECT("MapObjects2.MapLayer")



> > Hi all,

> > I am trying to use MapObjects (a GIS tool) with VFP 6.0
> > I have this piece of code as a sample in VBasic.

> [snip]

> > Could someone tell me which are the equivalents for:
> >   Dim oDataset As GeoDataset
> >   Dim oLayer As MapObjects2.MapLayer

> > Demetrios, Greece



Sun, 09 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. What is better: VFP or VBasic ...

2. VBasic ---> VFP environment

3. VFP equivalent to Terminate Read on Selection

4. VFP Equivalent to VB Byte Array??

5. Webclass Equivalent in VFP

6. VFP _CUROBJ equivalent

7. How do I convert this VB collection into a VFP equivalent

8. VFP equivalent of VB's COMMAND() function?

9. Vdbase vs VFox vs VBasic...

10. Question on Codebook and dimmed text

11. FPW26 & CODEBOOK Screen Fields Dimmed

12. What should I use for DIM within and object

 

 
Powered by phpBB® Forum Software