langjs 发表于 2011-5-5 14:11:54

请老大帮忙把下面的VB代码转换成lisp或者Vlisp代码

因为我看不懂VB ,麻烦老大帮忙把下面的VB代码转换成lisp或者Vlisp代码,谢谢。

Private Sub cmdTitleRead_Click()
   On Error Resume Next
    '从PCCAD数据库内核操作对象ITHDatabase获得ITHDbPaperRecorder
    '图框、标题栏操作对象
   Set ITHDbPaperRecorder = ITHDatabase.GetPaperRecorder
   '获得标题栏字段的个数
   Dim strItemKey As String, strItemValue As String
   Dim nCount As Integer, i As Integer
   nCount = ITHDbPaperRecorder.Count
   With MSFlexGrid1
   .TextMatrix(0, 0) = "项目"
   .TextMatrix(0, 1) = "内容"
   .Cols = 2
   .Rows = nCount + 1
   .ColWidth(0) = 2000
   .ColWidth(1) = 2000
   End With
   For i = 1 To nCount
      ITHDbPaperRecorder.GetItem strItemKey, strItemValue, i
      With MSFlexGrid1
            .TextMatrix(i, 0) = strItemKey
            .TextMatrix(i, 1) = strItemValue
      End With
      Debug.Print "项目:" & strItemKey & "       值:" & strItemValue
   Next i
   
   cmdTitleWrite.Enabled = True
End Sub
页: [1]
查看完整版本: 请老大帮忙把下面的VB代码转换成lisp或者Vlisp代码