General information
Category:
Coding, syntax & commands
Title:
VB6 substitute for the V/FP & (macro substitution)
In FoxPro, I can call a function with macro substitution. I have to use a very long Select Case statement in VB6 to accomplish the same thing. Is there a more efficient way to do this in VB6? (See examples below):
Thanks,
Dan
FoxPro Code:
SCAN
lcMethodName = "ST+states.stcode+"()"
DO &lcMethodName && Load the map polygon
=DrawPolygon(@laMap)
ENDSCAN
Visual Basic 6 Code:
For iCntr = 1 To UBound(pvarMap,1)
Select Case pvarMap(iCntr,mapMethodName)
Case "1100"
pvarMap = USMap.St1100(dxAxis,dyAxis)
Case "1110"
pvarMap = USMap.St1110(dxAxis,dyAxis)
Case "1120"
pvarMap = USMap.St1120(dxAxis,dyAxis)
End Select
DrawPolygon(ByRef pvarMap As Variant)
Next
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only