Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB to VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00804396
Message ID:
00805367
Vues:
27
Thank you Gunnar

It helped for the for command for sure.

Ali

>hi Ali
>
>I am not a VB programmer but it seems to me that the following code should work. however, you must find out the definition for 'moMapLayer' and the object 'Map1' must exist
>
>#define moMapLayer          && fill in the value for the definition of 'moMapLayer' here
>#define moFillSymbol  2
>#define moLineSymbol  1
>#define moPointSymbol 0
>
>l     = .NULL.
>ftype = ""
>
>* *** create the object 'Map1' here
>
>FOR EACH l IN Map1.Layers
>   IF l.LayerType = moMapLayer
>      DO CASE
>         CASE l.Symbol.SymbolType = moFillSymbol
>            ftype = "polygon"
>         CASE l.Symbol.SymbolType = moLineSymbol
>            ftype = "line"
>         CASE l.Symbol.SymbolType = moPointSymbol
>            ftype = "point"
>      ENDCASE
>      MessageBox(l.NAME + " contains " + ftype + " features")
>   ENDIF
>ENDFOR
>
>
>hope this helps.
>
>>Hi Everybody,
>>
>>I have a question for you. How do you translate the following VB codes into VFP 6:
>>
>>Dim l As Object
>> Dim ftype As String
>> For Each l In Map1.Layers
>> If l.LayerType = moMapLayer Then
>> Select Case l.Symbol.SymbolType
>> Case moFillSymbol '2
>> ftype = "polygon"
>> Case moLineSymbol '1
>> ftype = "line"
>> Case moPointSymbol '0
>> ftype = "point"
>> End Select
>> MsgBox l.Name & " contains " & ftype & " features"
>> End If
>> Next l
>>
>>I am specially intrested in "For Each I In Map1.Layers"
>>
>>Thank you,
>>Ali
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform