猿问

Call ShowPic 为什么要调用 ShowPic这个函数,这个函数是什么意思?

Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim str_Sql As String

Dim Chunk() As Byte
Dim lngLengh As Long
Dim intChunks As Integer
Dim intFragment As Integer
Const ChunkSize = 1000
Const lngDataFile = 1
Private Sub cmdBrowse_Click() '选择 JPG OR Bmp 文件
On Error Resume Next
With cmdlFilePath
.Filter = "JPG Files|*.JPG|Bitmaps|*.BMP"
.ShowOpen
txtFilePath.Text = .FileName
End With
End Sub
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdLast_Click()
On Error Resume Next
rs.MoveLast
Call ShowPic
End Sub
Private Sub cmdNext_Click()
On Error Resume Next
rs.MoveNext
Call ShowPic
End Sub
Private Sub cmdPrev_Click()
On Error Resume Next
rs.MovePrevious
我想知道得很透彻,应为我现在做一个课设想用到他,我才刚接触vb,请各位前辈帮帮忙,辛苦一点将详细一点
.Filter = "JPG Files|*.JPG|Bitmaps|*.BMP"  
.ShowOpen
txtFilePath.Text = .FileName
这段代码是什么意思啊

慕森卡
浏览 189回答 2
2回答

慕尼黑8549860

Dim cn As New ADODB.Connection '声明cn 为实例化的ADO链接Dim rs As New ADODB.Recordset '声明rs 为实例化的ADO记录集Dim str_Sql As String '声明cstr_sql为字符串型Dim Chunk() As Byte '声明Chunk() 为byte型 同下Dim lngLengh As LongDim intChunks As IntegerDim intFragment As IntegerConst ChunkSize = 1000 '声明常量 ChunkSize = 1000  Const lngDataFile = 1 '声明常量 lngDataFile = 1Private Sub cmdBrowse_Click() '声明过程cmdBrowse_Click()  On Error Resume Next ’出现错误继续执行With cmdlFilePath 'with为关键字,在此过程中执行以下语句.Filter = "JPG Files|*.JPG|Bitmaps|*.BMP"  .ShowOpentxtFilePath.Text = .FileNameEnd WithEnd Sub ’过程结束Private Sub cmdExit_Click() '声明过程cmdExit_Click() EndEnd SubPrivate Sub cmdLast_Click()'声明过程cmdLast_Click() On Error Resume Nextrs.MoveLast '记录集移到表的最后Call ShowPic '执行showpic函数End SubPrivate Sub cmdNext_Click() '声明过程cmdNext_Click()On Error Resume Nextrs.MoveNext '记录集向下移动一条Call ShowPic '执行showpic函数End SubPrivate Sub cmdPrev_Click()'声明过程cmdPrev_Click()On Error Resume Next  rs.MovePrevious '记录集向上移动可能不太标准就是 大概意思有了

蓝山帝景

兄弟你的代码不全,没有连接数据库的部分
随时随地看视频慕课网APP
我要回答