试试
Dim t As Table = Tables(e.Form.Name & "_FSCard")
If t.Rows.Count > 0 Then
For Each r As Row In t.Rows
If r("qrcode") > "" Then
Else
If r("img") > "" Then
Dim bs As Byte() = Convert.FromBase64String(r("img"))
Dim stream As System.IO.Stream = New System.IO.MemoryStream(bs)
Dim bmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(stream)
Dim source As New RGBLuminanceSource(bmap, bmap.Width, bmap.Height)
Dim bitmap As com.google.zxing.BinaryBitmap = New com.google.zxing.BinaryBitmap(New com.google.zxing.common.GlobalHistogramBinarizer(source))
Dim asd As new com.google.zxing.MultiFormatReader
Dim result As com.google.zxing.Result = asd.decode(bitmap)
r("qrcode") = result.Text
bmap.dispose
GC.Collect()
End If
End If
Application.DoEvents()
Next
Else
MessageBox.Show("当前表无记录!")
End If
[此贴子已经被作者于2020/4/10 10:25:39编辑过]