哪位大哥大姐把下面的vb代码翻译到pascal代码,兄弟十分感谢 ( 积分: 200 )

  • 主题发起人 主题发起人 vbkiller
  • 开始时间 开始时间
V

vbkiller

Unregistered / Unconfirmed
GUEST, unregistred user!
Option Explicit
Private Sub Form_Load()
Dim i As Integer
Label1(0).AutoSize = True
Label2(0).AutoSize = True
Label2(0).Caption = ""
For i = 1 To 4 ' Create four more instances of Label1 and Label2.
Load Label1(i)
Load Label2(i)
' Set the location of the new option button.
Label1(i).Top = Label1(i - 1).Top + Label1(0).Height + 40
Label1(i).Visible = True
Label2(i).Top = Label2(i - 1).Top + Label2(0).Height + 40
Label2(i).Visible = True
Next i
Label1(0).Caption = "Min"
Label1(1).Caption = "Max"
Label1(2).Caption = "Mean"
Label1(3).Caption = "StdDev"
Label1(4).Caption = "Sum"
End Sub
Private Sub List1_Click()
Dim oStats As MapObjects2.Statistics
Set oStats = Map1.Layers(0).Records.CalculateStatistics _
(List1.List(List1.ListIndex))
Label2(0) = oStats.Min
Label2(1) = oStats.Max
Label2(2) = oStats.Mean
Label2(3) = oStats.StdDev
Label2(4) = oStats.Sum
End Sub
Private Sub Map1_AfterLayerDraw(ByVal index As Integer, ByVal canceled As Boolean, ByVal hDC As Stdole.OLE_HANDLE)
Dim oField As MapObjects2.Field
For Each oField In Map1.Layers(0).Records.Fields
'fields that only contain numeric values:
If VarType(oField.Value) > vbNull And VarType(oField.Value) < moString then
List1.AddItem oField.Name
End If
Next
End Sub
以上代码关于面积统计的功能,但我没有成功的把它翻译到pascal代码中
在这里小弟给大哥大姐们上柱香了
 
后退
顶部