一个VB小程序的源代码~~~帮忙注释一下!!!!!高分!!在线等!!

来源:百度知道 编辑:UC知道 时间:2024/05/16 18:45:43
Private Sub Command1_Click()
CDlg.FileName = ""
CDlg.ShowOpen
If CDlg.FileName <> "" Then
Image1.Picture = LoadPicture(CDlg.FileName)
End If
End Sub
Private Sub Command2_Click()
Data1.Recordset.AddNew
End Sub
Private Sub Command3_Click()
With Data1.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
End Sub
Private Sub Command4_Click()
Dim s As String
With Data1.Recordset
s = .Bookmark
.FindFirst Text4.Text
If .NoMatch Then
MsgBox "数据未找到"
.Bookmark = s
End If
End With
End Sub
Private Sub Command5_Click()
Dim s As String
With Data1.Recordset
s = .Bookmark
.FindNext Text4.Text
If .NoMatch Then
MsgBox "数据未找到"
.Bookmark = s
End If
End With

Option Explicit

Private Sub Command1_Click() '通过对话框选择图片装载到Image1图像框
CDlg.FileName = ""
CDlg.ShowOpen
If CDlg.FileName <> "" Then
Image1.Picture = LoadPicture(CDlg.FileName)
End If
End Sub
Private Sub Command2_Click()
Data1.Recordset.AddNew '新增记录
End Sub
Private Sub Command3_Click()
With Data1.Recordset
.Delete '删除记录
.MoveNext '移动记录指针到下一条记录
If .EOF Then .MoveLast 'EOF 指示当前记录位置位于 Recordset 对象的最后一个记录之后
End With
End Sub
Private Sub Command4_Click()
Dim s As String
With Data1.Recordset
s = .Bookmark '返回唯一标识 Recordset 对象中当前记录的书签,或者将 Recordset 对象的当前记录设置为由有效书签所标识的记录。
.FindFirst Text4.Text
If .NoMatch Then
MsgBox "数据未找到"
.Bookmark = s
End If
End With
End Sub
Private Sub Command5_Click()
Dim s As String
With Data1.Recordset
s = .Bookmark
.FindNext Text4.Text
If